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