dtsdec: fix buffer parsing

... to avoid feeding empty buffers to decoder.
This commit is contained in:
Mark Nauwelaerts 2012-10-11 15:31:04 +02:00
parent e5eceaaa73
commit 304cf8e1c5

View file

@ -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 */