[0.11] gst-plugins-good: matroskademux: Properly use the alignment parameter of gst_buffer_new_allocate()

Sebastian Dröge slomo at kemper.freedesktop.org
Thu Jan 26 02:29:41 PST 2012


Module: gst-plugins-good
Branch: 0.11
Commit: 57fb67eb599707f2714c90e54aa82709d08c255c
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-good/commit/?id=57fb67eb599707f2714c90e54aa82709d08c255c

Author: Sebastian Dröge <sebastian.droege at collabora.co.uk>
Date:   Thu Jan 26 11:29:11 2012 +0100

matroskademux: Properly use the alignment parameter of gst_buffer_new_allocate()

It's a bitmask for the alignment, not the alignment itself.

---

 gst/matroska/matroska-demux.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/gst/matroska/matroska-demux.c b/gst/matroska/matroska-demux.c
index 42fee5a..584d30d 100644
--- a/gst/matroska/matroska-demux.c
+++ b/gst/matroska/matroska-demux.c
@@ -3034,7 +3034,7 @@ gst_matroska_demux_align_buffer (GstMatroskaDemux * demux,
     GstBuffer *new_buffer;
 
     new_buffer = gst_buffer_new_allocate (NULL,
-        gst_buffer_get_size (buffer), alignment);
+        gst_buffer_get_size (buffer), alignment - 1);
 
     /* Copy data "by hand", so ensure alignment is kept: */
     gst_buffer_fill (new_buffer, 0, map.data, map.size);



More information about the gstreamer-commits mailing list