From 43afed87526ce726b3732e7f883f27a59fdc752e Mon Sep 17 00:00:00 2001 From: Alban Browaeys Date: Mon, 2 Apr 2012 19:31:20 +0200 Subject: [PATCH] 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 --- ext/a52dec/gsta52dec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ext/a52dec/gsta52dec.c b/ext/a52dec/gsta52dec.c index f684721..290ae47 100644 --- a/ext/a52dec/gsta52dec.c +++ b/ext/a52dec/gsta52dec.c @@ -670,10 +670,11 @@ gst_a52dec_chain (GstPad * pad, GstObject * parent, GstBuffer * buf) 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 */ -- 2.7.4