gst-plugins-ugly: mad: fixup unhacking last frame coaxing

Mark Nauwelaerts mnauw at kemper.freedesktop.org
Tue Feb 21 09:58:36 PST 2012


Module: gst-plugins-ugly
Branch: master
Commit: 5dead1c4007af753bb2895e9c44b2582b0b3ec3a
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-ugly/commit/?id=5dead1c4007af753bb2895e9c44b2582b0b3ec3a

Author: Mark Nauwelaerts <mark.nauwelaerts at collabora.co.uk>
Date:   Tue Feb 21 18:49:50 2012 +0100

mad: fixup unhacking last frame coaxing

... so as to not only replace the data pointer but also available size.

---

 ext/mad/gstmad.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/ext/mad/gstmad.c b/ext/mad/gstmad.c
index 9b5f597..cd3d068 100644
--- a/ext/mad/gstmad.c
+++ b/ext/mad/gstmad.c
@@ -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,



More information about the gstreamer-commits mailing list