diff --git a/ChangeLog b/ChangeLog index 411751ed1d..1f53817fd6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2004-03-06 Benjamin Otte + + * ext/mad/gstid3tag.c: (gst_id3_tag_chain): + fix huge leak: gst_buffer_merge doesn't unref the first argument + itself. + 2004-03-06 Thomas Vander Stichele * ext/mad/gstmad.c: (gst_mad_class_init), (gst_mad_update_info): diff --git a/ext/mad/gstid3tag.c b/ext/mad/gstid3tag.c index dfb24dc23a..c56e157bbf 100644 --- a/ext/mad/gstid3tag.c +++ b/ext/mad/gstid3tag.c @@ -867,7 +867,10 @@ gst_id3_tag_chain (GstPad *pad, GstData *data) return; case GST_ID3_TAG_STATE_READING_V1_TAG: if (tag->buffer) { - tag->buffer = gst_buffer_merge (tag->buffer, buffer); + GstBuffer *temp; + temp = gst_buffer_merge (tag->buffer, buffer); + gst_data_unref (GST_DATA (tag->buffer)); + tag->buffer = temp; gst_data_unref (GST_DATA (buffer)); } else { tag->buffer = buffer; @@ -923,7 +926,10 @@ gst_id3_tag_chain (GstPad *pad, GstData *data) return; case GST_ID3_TAG_STATE_READING_V2_TAG: if (tag->buffer) { - tag->buffer = gst_buffer_merge (tag->buffer, buffer); + GstBuffer *temp; + temp = gst_buffer_merge (tag->buffer, buffer); + gst_data_unref (GST_DATA (tag->buffer)); + tag->buffer = temp; gst_data_unref (GST_DATA (buffer)); } else { tag->buffer = buffer;