mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-30 12:49:40 +00:00
h264decoder: Don't scan empty buffer
gst_adapter_masked_scan_uint32_peek() asserts if size is 0. Don't try and scan in that case. This fixes assertion that would some times happen when the stream is corrupted. https://bugzilla.gnome.org/show_bug.cgi?id=796832
This commit is contained in:
parent
f5eb4faa59
commit
927536b791
1 changed files with 3 additions and 0 deletions
|
@ -4236,6 +4236,9 @@ decode_slice (GstVaapiDecoderH264 * decoder, GstVaapiDecoderUnit * unit)
|
||||||
static inline gint
|
static inline gint
|
||||||
scan_for_start_code (GstAdapter * adapter, guint ofs, guint size, guint32 * scp)
|
scan_for_start_code (GstAdapter * adapter, guint ofs, guint size, guint32 * scp)
|
||||||
{
|
{
|
||||||
|
if (size == 0)
|
||||||
|
return -1;
|
||||||
|
|
||||||
return (gint) gst_adapter_masked_scan_uint32_peek (adapter,
|
return (gint) gst_adapter_masked_scan_uint32_peek (adapter,
|
||||||
0xffffff00, 0x00000100, ofs, size, scp);
|
0xffffff00, 0x00000100, ofs, size, scp);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue