[MOVED FROM GST-P-FARSIGHT] Robustness check, make sure the queue is not empty before using the head element

20080429003600-4f0f6-708c654b65812caeb3612248dbe0b2e62567c250.gz
This commit is contained in:
Youness Alaoui 2008-04-29 00:36:00 +00:00 committed by Edward Hervey
parent 7a4034db44
commit 1c57d2d70c

View file

@ -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);