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.
This commit is contained in:
Wim Taymans 2006-07-28 14:14:58 +00:00
parent a83f89be72
commit 157124eacb
2 changed files with 16 additions and 4 deletions

View file

@ -1,3 +1,10 @@
2006-07-28 Wim Taymans <wim@fluendo.com>
* 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 <msmith@fluendo.com> 2006-07-28 Michael Smith <msmith@fluendo.com>
* tests/check/pipelines/vorbisenc.c: (GST_START_TEST), * tests/check/pipelines/vorbisenc.c: (GST_START_TEST),

View file

@ -230,6 +230,7 @@ gst_adder_setcaps (GstPad * pad, GstCaps * caps)
return TRUE; return TRUE;
/* ERRORS */
not_supported: not_supported:
{ {
GST_DEBUG_OBJECT (adder, "unsupported format set as caps"); 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 /* FIXME, the duration query should reflect how long you will produce
* data, that is the amount of stream time until you will emit EOS. * 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 * For synchronized mixing this is always the max of all the durations
* EOS when all of them finished. * of upstream since we emit EOS when all of them finished.
*
* We don't do synchronized mixing so this really depends on where the * We don't do synchronized mixing so this really depends on where the
* streams where punched in and what their relative offsets are against * streams where punched in and what their relative offsets are against
* eachother which we can get from the first timestamps we see. * eachother which we can get from the first timestamps we see.
*
* When we add a new stream (or remove a stream) the duration might * 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 * also become invalid again and we need to post a new DURATION
* message to notify this fact to the parent. * message to notify this fact to the parent.
* For now we take the max of all the upstream elements so the simple * 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 static gboolean
gst_adder_query_duration (GstAdder * adder, GstQuery * query) gst_adder_query_duration (GstAdder * adder, GstQuery * query)
{ {
@ -306,6 +310,7 @@ gst_adder_query_duration (GstAdder * adder, GstQuery * query)
break; break;
} }
} }
gst_iterator_free (it);
if (res) { if (res) {
/* and store the max */ /* and store the max */