hlsdemux: check if the task's cond was signaled because it's the end of playlist
authorAndoni Morales Alastruey <ylatuya@gmail.com>
Tue, 29 Mar 2011 21:06:14 +0000 (23:06 +0200)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Wed, 30 Mar 2011 07:19:23 +0000 (09:19 +0200)
gst/hls/gsthlsdemux.c

index 4513ef0b1ea4cc5b2674a7ac7b902eddfb9fd50f..745dfd1bc9691f34a4b79c14a76c3a10abb624e2 100644 (file)
@@ -532,6 +532,11 @@ gst_hls_demux_loop (GstHLSDemux * demux)
     GST_TASK_WAIT (demux->task);
   }
 
+  /* Check again if it's the end of the playlist in case we we reached */
+  if (demux->end_of_playlist) {
+    goto end_of_playlist;
+  }
+
   buf = g_queue_pop_head (demux->queue);
   ret = gst_pad_push (demux->srcpad, buf);
   if (ret != GST_FLOW_OK)