summaryrefslogtreecommitdiffstats
path: root/gst/mpeg2sub/gstmpeg2subt.c
diff options
context:
space:
mode:
authorChristophe Fergeau <teuf@gnome.org>2004-03-06 20:56:28 +0000
committerChristophe Fergeau <teuf@gnome.org>2004-03-06 20:56:28 +0000
commitf8781e3de80c7602f854e98d16ba72e7427e8887 (patch)
tree9c9434f16d84685c87595b84152d5886d58c3ddd /gst/mpeg2sub/gstmpeg2subt.c
parenta11cf2ec0a951b954857ebfa83abbfa4ac6db77e (diff)
downloadgst-plugins-bad-f8781e3de80c7602f854e98d16ba72e7427e8887.tar.gz
gst-plugins-bad-f8781e3de80c7602f854e98d16ba72e7427e8887.tar.bz2
gst-plugins-bad-f8781e3de80c7602f854e98d16ba72e7427e8887.zip
Fix several misuse of gst_buffer_merge (it doesn't take ownership of any buffer), should fix some leaks. I hope I did...
Original commit message from CVS: 2004-03-06 Christophe Fergeau <teuf@gnome.org> * ext/faac/gstfaac.c: (gst_faac_chain): * ext/flac/gstflactag.c: (gst_flac_tag_chain): * ext/libpng/gstpngenc.c: (user_write_data): * ext/mikmod/gstmikmod.c: (gst_mikmod_loop): * gst/ac3parse/gstac3parse.c: (gst_ac3parse_chain): * gst/mpeg2sub/gstmpeg2subt.c: (gst_mpeg2subt_chain_subtitle): * gst/mpegstream/gstrfc2250enc.c: (gst_rfc2250_enc_add_slice): Fix several misuse of gst_buffer_merge (it doesn't take ownership of any buffer), should fix some leaks. I hope I didn't unref buffers that shouldn't be...
Diffstat (limited to 'gst/mpeg2sub/gstmpeg2subt.c')
-rw-r--r--gst/mpeg2sub/gstmpeg2subt.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gst/mpeg2sub/gstmpeg2subt.c b/gst/mpeg2sub/gstmpeg2subt.c
index 1774b13e..d267932a 100644
--- a/gst/mpeg2sub/gstmpeg2subt.c
+++ b/gst/mpeg2sub/gstmpeg2subt.c
@@ -369,10 +369,11 @@ gst_mpeg2subt_chain_subtitle (GstPad *pad, GstData *_data)
/* deal with partial frame from previous buffer */
if (mpeg2subt->partialbuf) {
-
- mpeg2subt->partialbuf = gst_buffer_merge(mpeg2subt->partialbuf, buf);
- /* and the one we received.. */
+ GstBuffer *merge;
+ merge = gst_buffer_merge(mpeg2subt->partialbuf, buf);
+ gst_buffer_unref (mpeg2subt->partialbuf);
gst_buffer_unref(buf);
+ mpeg2subt->partialbuf = merge;
}
else {
mpeg2subt->partialbuf = buf;