mad: fixup unhacking last frame coaxing
authorMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Tue, 21 Feb 2012 17:49:50 +0000 (18:49 +0100)
committerMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Tue, 21 Feb 2012 17:54:42 +0000 (18:54 +0100)
... so as to not only replace the data pointer but also available size.

ext/mad/gstmad.c

index 9b5f597..cd3d068 100644 (file)
@@ -300,10 +300,11 @@ gst_mad_parse (GstAudioDecoder * dec, GstAdapter * adapter,
     /* let's be nice and not mess with baseclass state and keep hacks local */
     memset (GST_BUFFER_DATA (guard), 0, GST_BUFFER_SIZE (guard));
     memcpy (GST_BUFFER_DATA (guard), data, av);
-    GST_DEBUG_OBJECT (mad, "Added %u zero guard bytes in the adapter; "
+    GST_DEBUG_OBJECT (mad, "added %u zero guard bytes in the adapter; "
         "using fallback buffer of size %u",
         GST_BUFFER_SIZE (guard) - av, GST_BUFFER_SIZE (guard));
     data = GST_BUFFER_DATA (guard);
+    av = GST_BUFFER_SIZE (guard);
   }
 
   /* we basically let mad library do parsing,