Commit fba893a1 authored by Luc Saillard's avatar Luc Saillard Committed by Jean-Baptiste Kempf

httplive module takes all cpu power when playing live stream

When playing a live stream, the thread didn't wait for an event, so it's
like a while(1)... Just wait until we read/need a new segment.
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 673cd7b5
......@@ -1206,10 +1206,11 @@ static void* hls_Thread(void *p_this)
(p_sys->download.segment >= count)) &&
(p_sys->download.seek == -1))
{
vlc_cond_wait(&p_sys->download.wait, &p_sys->download.lock_wait);
if (p_sys->b_live /*&& (mdate() >= p_sys->playlist.wakeup)*/)
break;
vlc_cond_wait(&p_sys->download.wait, &p_sys->download.lock_wait);
if (!vlc_object_alive(s)) break;
if (!vlc_object_alive(s))
break;
}
/* */
if (p_sys->download.seek >= 0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment