a52dec: fix first_access bigger than 2
gst_buffer_extract returns the number of bytes extracted, here 2 max. Set size to the buffer size as was done in 0.10 to avoid first_access error when it bypass 2. https://bugzilla.gnome.org/show_bug.cgi?id=673434
This commit is contained in:
parent
1f8d9315b8
commit
43afed8752
@ -670,10 +670,11 @@ gst_a52dec_chain (GstPad * pad, GstObject * parent, GstBuffer * buf)
|
|||||||
gint len;
|
gint len;
|
||||||
GstBuffer *subbuf;
|
GstBuffer *subbuf;
|
||||||
|
|
||||||
size = gst_buffer_extract (buf, 0, data, 2);
|
size = gst_buffer_get_size (buf);
|
||||||
if (size < 2)
|
if (size < 2)
|
||||||
goto not_enough_data;
|
goto not_enough_data;
|
||||||
|
|
||||||
|
gst_buffer_extract (buf, 0, data, 2);
|
||||||
first_access = (data[0] << 8) | data[1];
|
first_access = (data[0] << 8) | data[1];
|
||||||
|
|
||||||
/* Skip the first_access header */
|
/* Skip the first_access header */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user