[vlc-devel] [PATCH] HLS: don't signal dl thread out of the blue in Close()

Frederic YHUEL fyhuel at viotech.net
Mon Jun 25 09:48:06 CEST 2012


On Tue, Jun 19, 2012 at 4:17 PM, Frédéric Yhuel <fyhuel at viotech.net> wrote:
> ---
>  modules/stream_filter/httplive.c |    5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/modules/stream_filter/httplive.c b/modules/stream_filter/httplive.c
> index 5b15bab..5758189 100644
> --- a/modules/stream_filter/httplive.c
> +++ b/modules/stream_filter/httplive.c
> @@ -2000,8 +2000,11 @@ static void Close(vlc_object_t *p_this)
>
>     /* */
>     vlc_mutex_lock(&p_sys->download.lock_wait);
> -    vlc_cond_signal(&p_sys->download.wait);
> +    /* negate the condition variable's predicate */
> +    p_sys->download.segment = p_sys->playback.segment = 0;
> +    p_sys->download.seek = 0; /* better safe than sorry */
>     vlc_mutex_unlock(&p_sys->download.lock_wait);
> +    vlc_cond_signal(&p_sys->download.wait);
>
>     /* */
>     if (p_sys->b_live)
> --

No?


Best regards
Frédéric



More information about the vlc-devel mailing list