mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 15:51:11 +00:00
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...
This commit is contained in:
parent
905db051a9
commit
89bbfdc368
4 changed files with 32 additions and 5 deletions
13
ChangeLog
13
ChangeLog
|
@ -1,3 +1,16 @@
|
|||
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...
|
||||
|
||||
2004-03-06 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||
|
||||
* gst-libs/gst/media-info/media-info-priv.c: (have_type_callback),
|
||||
|
|
|
@ -264,7 +264,11 @@ gst_flac_tag_chain (GstPad *pad, GstData *data)
|
|||
tag = GST_FLAC_TAG (gst_pad_get_parent (pad));
|
||||
|
||||
if (tag->buffer) {
|
||||
tag->buffer = gst_buffer_merge (tag->buffer, buffer);
|
||||
GstBuffer *merge;
|
||||
merge = gst_buffer_merge (tag->buffer, buffer);
|
||||
gst_buffer_unref (buffer);
|
||||
gst_buffer_unref (tag->buffer);
|
||||
tag->buffer = merge;
|
||||
} else {
|
||||
tag->buffer = buffer;
|
||||
}
|
||||
|
@ -365,7 +369,11 @@ gst_flac_tag_chain (GstPad *pad, GstData *data)
|
|||
if (tag->vorbiscomment == NULL) {
|
||||
tag->vorbiscomment = sub;
|
||||
} else {
|
||||
tag->vorbiscomment = gst_buffer_merge (tag->vorbiscomment, sub);
|
||||
GstBuffer *merge;
|
||||
merge = gst_buffer_merge (tag->vorbiscomment, sub);
|
||||
gst_buffer_unref (tag->vorbiscomment);
|
||||
gst_buffer_unref (sub);
|
||||
tag->vorbiscomment = merge;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -207,8 +207,11 @@ void user_write_data (png_structp png_ptr, png_bytep data, png_uint_32 length)
|
|||
|
||||
if (pngenc->buffer_out)
|
||||
{
|
||||
pngenc->buffer_out = gst_buffer_merge (pngenc->buffer_out, buffer);
|
||||
GstBuffer *merge;
|
||||
merge = gst_buffer_merge (pngenc->buffer_out, buffer);
|
||||
gst_buffer_unref (buffer);
|
||||
gst_buffer_unref (pngenc->buffer_out);
|
||||
pngenc->buffer_out = merge;
|
||||
}
|
||||
else
|
||||
pngenc->buffer_out = buffer;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue