From 157124eacb3ad05e81d76b52ceaaa69cf7ce775f Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Fri, 28 Jul 2006 14:14:58 +0000 Subject: [PATCH] gst/adder/gstadder.c: Fix leak in duration query. Original commit message from CVS: * gst/adder/gstadder.c: (gst_adder_setcaps), (gst_adder_query_duration): Fix leak in duration query. Reflow some docs and notes. --- ChangeLog | 7 +++++++ gst/adder/gstadder.c | 13 +++++++++---- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 54cdd3c..4971279 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2006-07-28 Wim Taymans + + * gst/adder/gstadder.c: (gst_adder_setcaps), + (gst_adder_query_duration): + Fix leak in duration query. + Reflow some docs and notes. + 2006-07-28 Michael Smith * tests/check/pipelines/vorbisenc.c: (GST_START_TEST), diff --git a/gst/adder/gstadder.c b/gst/adder/gstadder.c index f8a9028..9f93722 100644 --- a/gst/adder/gstadder.c +++ b/gst/adder/gstadder.c @@ -230,6 +230,7 @@ gst_adder_setcaps (GstPad * pad, GstCaps * caps) return TRUE; + /* ERRORS */ not_supported: { GST_DEBUG_OBJECT (adder, "unsupported format set as caps"); @@ -239,17 +240,20 @@ not_supported: /* FIXME, the duration query should reflect how long you will produce * data, that is the amount of stream time until you will emit EOS. - * For synchronized mixing this - * is always the max of all the durations of upstream since we emit - * EOS when all of them finished. + * + * For synchronized mixing this is always the max of all the durations + * of upstream since we emit EOS when all of them finished. + * * We don't do synchronized mixing so this really depends on where the * streams where punched in and what their relative offsets are against * eachother which we can get from the first timestamps we see. + * * When we add a new stream (or remove a stream) the duration might * also become invalid again and we need to post a new DURATION * message to notify this fact to the parent. * For now we take the max of all the upstream elements so the simple - * cases work at least somewhat. */ + * cases work at least somewhat. + */ static gboolean gst_adder_query_duration (GstAdder * adder, GstQuery * query) { @@ -306,6 +310,7 @@ gst_adder_query_duration (GstAdder * adder, GstQuery * query) break; } } + gst_iterator_free (it); if (res) { /* and store the max */ -- 2.7.4