[0.11] gst-plugins-ugly: mad: Correctly unmap the buffer with the original data pointer
Sebastian Dröge
slomo at kemper.freedesktop.org
Mon Jan 9 06:25:12 PST 2012
Module: gst-plugins-ugly
Branch: 0.11
Commit: 9c646f59ac10e816fc9f0ea856ba4c2782b8e546
URL: http://cgit.freedesktop.org/gstreamer/gst-plugins-ugly/commit/?id=9c646f59ac10e816fc9f0ea856ba4c2782b8e546
Author: Sebastian Dröge <sebastian.droege at collabora.co.uk>
Date: Mon Jan 9 15:24:53 2012 +0100
mad: Correctly unmap the buffer with the original data pointer
---
ext/mad/gstmad.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/ext/mad/gstmad.c b/ext/mad/gstmad.c
index dae4264..db3cc20 100644
--- a/ext/mad/gstmad.c
+++ b/ext/mad/gstmad.c
@@ -411,7 +411,7 @@ gst_mad_handle_frame (GstAudioDecoder * dec, GstBuffer * buffer)
GstFlowReturn ret = GST_FLOW_EOS;
GstBuffer *outbuffer;
guint nsamples;
- gint32 *outdata;
+ gint32 *data, *outdata;
mad_fixed_t const *left_ch, *right_ch;
mad = GST_MAD (dec);
@@ -435,7 +435,7 @@ gst_mad_handle_frame (GstAudioDecoder * dec, GstBuffer * buffer)
outbuffer = gst_buffer_new_and_alloc (nsamples * mad->channels * 4);
- outdata = gst_buffer_map (outbuffer, NULL, NULL, GST_MAP_WRITE);
+ data = outdata = gst_buffer_map (outbuffer, NULL, NULL, GST_MAP_WRITE);
/* output sample(s) in 16-bit signed native-endian PCM */
if (mad->channels == 1) {
@@ -453,7 +453,7 @@ gst_mad_handle_frame (GstAudioDecoder * dec, GstBuffer * buffer)
}
}
- gst_buffer_unmap (outbuffer, outdata, -1);
+ gst_buffer_unmap (outbuffer, data, -1);
ret = gst_audio_decoder_finish_frame (dec, outbuffer, 1);
More information about the gstreamer-commits
mailing list