summaryrefslogtreecommitdiffstats
path: root/ext/faad
diff options
context:
space:
mode:
Diffstat (limited to 'ext/faad')
-rw-r--r--ext/faad/gstfaad.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/ext/faad/gstfaad.c b/ext/faad/gstfaad.c
index c5b900cf..6fc19d98 100644
--- a/ext/faad/gstfaad.c
+++ b/ext/faad/gstfaad.c
@@ -571,8 +571,13 @@ gst_faad_chain (GstPad * pad, GstData * data)
buf = GST_BUFFER (data);
next_ts = GST_BUFFER_TIMESTAMP (buf);
if (faad->tempbuf) {
- buf = gst_buffer_join (faad->tempbuf, buf);
+ GstBuffer *new = NULL;
+
+ new = gst_buffer_join (faad->tempbuf, buf);
+ gst_buffer_unref (faad->tempbuf);
faad->tempbuf = NULL;
+ gst_buffer_unref (buf);
+ buf = new;
}
/* init if not already done during capsnego */