mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 18:05:37 +00:00
dtsdec: fix buffer parsing
... to avoid feeding empty buffers to decoder.
This commit is contained in:
parent
e5eceaaa73
commit
304cf8e1c5
1 changed files with 2 additions and 1 deletions
|
@ -665,10 +665,11 @@ gst_dtsdec_chain (GstPad * pad, GstObject * parent, GstBuffer * buf)
|
|||
gint offset, len;
|
||||
GstBuffer *subbuf;
|
||||
|
||||
size = gst_buffer_extract (buf, 0, data, 2);
|
||||
size = gst_buffer_get_size (buf);
|
||||
if (size < 2)
|
||||
goto not_enough_data;
|
||||
|
||||
gst_buffer_extract (buf, 0, data, 2);
|
||||
first_access = (data[0] << 8) | data[1];
|
||||
|
||||
/* Skip the first_access header */
|
||||
|
|
Loading…
Reference in a new issue