diff options
author | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2012-01-09 15:24:53 +0100 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2012-01-09 15:24:53 +0100 |
commit | 9c646f59ac10e816fc9f0ea856ba4c2782b8e546 (patch) | |
tree | 6a65a3cf8ada37c10c9b6a5d731a812ea72d5497 | |
parent | a120944340b06457e238e278fcf6fe7cdadf36ab (diff) |
mad: Correctly unmap the buffer with the original data pointer
-rw-r--r-- | 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 dae42640..db3cc20b 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); |