summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYouness Alaoui <youness.alaoui@collabora.co.uk>2008-04-29 00:36:00 +0000
committerEdward Hervey <bilboed@bilboed.com>2009-02-17 19:29:05 +0100
commit1c57d2d70c3aefdef2228f370f782ae313a8c857 (patch)
tree91797cce83fe3fafebb2ef083a96eccefb6d3eda
parent7a4034db44c4d728f42c6f01769e6841d6bc6270 (diff)
downloadgst-plugins-bad-1c57d2d70c3aefdef2228f370f782ae313a8c857.tar.gz
gst-plugins-bad-1c57d2d70c3aefdef2228f370f782ae313a8c857.tar.bz2
gst-plugins-bad-1c57d2d70c3aefdef2228f370f782ae313a8c857.zip
[MOVED FROM GST-P-FARSIGHT] Robustness check, make sure the queue is not empty before using the head element
20080429003600-4f0f6-708c654b65812caeb3612248dbe0b2e62567c250.gz
-rw-r--r--gst/liveadder/liveadder.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gst/liveadder/liveadder.c b/gst/liveadder/liveadder.c
index 12a82cb4..67b817e9 100644
--- a/gst/liveadder/liveadder.c
+++ b/gst/liveadder/liveadder.c
@@ -873,6 +873,7 @@ gst_live_live_adder_chain (GstPad *pad, GstBuffer *buffer)
* we may not have to wait for as long
*/
if (adder->clock_id &&
+ g_queue_peek_head (adder->buffers) != NULL &&
GST_BUFFER_TIMESTAMP (buffer) + skip <
GST_BUFFER_TIMESTAMP (g_queue_peek_head (adder->buffers)))
gst_clock_id_unschedule (adder->clock_id);