summaryrefslogtreecommitdiffstats
path: root/ext/mikmod
diff options
context:
space:
mode:
authorChristophe Fergeau <teuf@gnome.org>2004-03-06 20:56:27 +0000
committerChristophe Fergeau <teuf@gnome.org>2004-03-06 20:56:27 +0000
commit89bbfdc3683c00f14cf7142cd19faadaf2ccc1c8 (patch)
treef15690de330dcca1c0a8626706d78de0c21d5ddc /ext/mikmod
parent905db051a9c0e5559a760990044e6a205dd2cfdf (diff)
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 'ext/mikmod')
-rw-r--r--ext/mikmod/gstmikmod.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/ext/mikmod/gstmikmod.c b/ext/mikmod/gstmikmod.c
index c777ef46..cec788d5 100644
--- a/ext/mikmod/gstmikmod.c
+++ b/ext/mikmod/gstmikmod.c
@@ -298,8 +298,11 @@ gst_mikmod_loop (GstElement *element)
else
{
if ( mikmod->Buffer ) {
- mikmod->Buffer = gst_buffer_merge( mikmod->Buffer, buffer_in );
- gst_buffer_unref( buffer_in );
+ GstBuffer *merge;
+ merge = gst_buffer_merge( mikmod->Buffer, buffer_in );
+ gst_buffer_unref( buffer_in );
+ gst_buffer_unref( mikmod->Buffer );
+ mikmod->Buffer = merge;
}
else
mikmod->Buffer = buffer_in;