summaryrefslogtreecommitdiff
path: root/ext/faad
diff options
context:
space:
mode:
authorMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>2012-08-02 14:40:55 +0200
committerMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>2012-08-02 14:40:55 +0200
commit19ca77e95eaa4745cb9b6f64edee5d03b2334452 (patch)
tree196fc250e89690f2f4c678523b650f4b8d7f634e /ext/faad
parenta48cfea4a2875775dc48f330e55f3628c6e90a82 (diff)
faad: do not access frame buffer following _finish_frame call
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=680494
Diffstat (limited to 'ext/faad')
-rw-r--r--ext/faad/gstfaad.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/faad/gstfaad.c b/ext/faad/gstfaad.c
index 46661fc93e..4434e40394 100644
--- a/ext/faad/gstfaad.c
+++ b/ext/faad/gstfaad.c
@@ -749,6 +749,9 @@ init:
out = faacDecDecode (faad->handle, &info, input_data, input_size);
+ gst_buffer_unmap (buffer, &map);
+ buffer = NULL;
+
if (info.error > 0) {
/* give up on frame and bail out */
gst_audio_decoder_finish_frame (dec, NULL, 1);
@@ -792,8 +795,6 @@ init:
memcpy (omap.data, out, omap.size);
}
gst_buffer_unmap (outbuf, &omap);
- gst_buffer_unmap (buffer, &map);
- buffer = NULL;
ret = gst_audio_decoder_finish_frame (dec, outbuf, 1);
}