diff options
author | Olivier Crete <olivier.crete@collabora.co.uk> | 2008-05-14 23:26:43 +0000 |
---|---|---|
committer | Edward Hervey <bilboed@bilboed.com> | 2009-02-17 19:29:05 +0100 |
commit | 5f37d95613bc6dc22d0ee5417804d75e9bc3fbf0 (patch) | |
tree | 818aa3312a5d996c93a3a51c10382020f5b02509 /gst | |
parent | c653d0ac3839d36156d64e058ca9011e82b6957a (diff) | |
download | gst-plugins-bad-5f37d95613bc6dc22d0ee5417804d75e9bc3fbf0.tar.gz gst-plugins-bad-5f37d95613bc6dc22d0ee5417804d75e9bc3fbf0.tar.bz2 gst-plugins-bad-5f37d95613bc6dc22d0ee5417804d75e9bc3fbf0.zip |
[MOVED FROM GST-P-FARSIGHT] Empty the queue on flush start
20080514232643-3e2dc-5a3f52a3fd3771164dea95bd14410d76b4fce2aa.gz
Diffstat (limited to 'gst')
-rw-r--r-- | gst/liveadder/liveadder.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gst/liveadder/liveadder.c b/gst/liveadder/liveadder.c index d2345021..3ad1e192 100644 --- a/gst/liveadder/liveadder.c +++ b/gst/liveadder/liveadder.c @@ -437,6 +437,11 @@ gst_live_adder_flush_start (GstLiveAdder * adder) GST_OBJECT_LOCK (adder); /* mark ourselves as flushing */ adder->srcresult = GST_FLOW_WRONG_STATE; + + /* Empty the queue */ + g_queue_foreach (adder->buffers, (GFunc) gst_mini_object_unref, NULL); + while (g_queue_pop_head (adder->buffers)) {} + /* unlock clock, we just unschedule, the entry will be released by the * locking streaming thread. */ if (adder->clock_id) |