[vlc-devel] [PATCH 06/48] hls: Fix when server change playlist

Jean-Paul Saman jpsaman at videolan.org
Tue Jan 10 12:16:34 CET 2012


Good catch.

This patch should also include the unlocking of the segment and a
description of the reason for this modification.

Kind regards,

Jean-Paul Saman


On Mon, Jan 9, 2012 at 4:16 PM, Hugo Beauzée-Luyssen <beauze.h at gmail.com> wrote:
> From: Luc Saillard <luc.saillard at sfr.com>
>
> ---
>  modules/stream_filter/httplive.c |    9 +--------
>  1 files changed, 1 insertions(+), 8 deletions(-)
>
> diff --git a/modules/stream_filter/httplive.c b/modules/stream_filter/httplive.c
> index b380d05..1282618 100644
> --- a/modules/stream_filter/httplive.c
> +++ b/modules/stream_filter/httplive.c
> @@ -1314,13 +1314,7 @@ static int hls_UpdatePlaylist(stream_t *s, hls_stream_t *hls_new, hls_stream_t *
>                 msg_Warn(s, "        old=%s", segment->uri );
>
>                 /* Resetting content */
> -                char *psz_url = ConstructUrl(&p->url);
> -                if (psz_url == NULL)
> -                {
> -                    msg_Err(s, "Failed updating segment %d - skipping it",  p->sequence);
> -                    segment_Free(p);
> -                    continue;
> -                }
> +                vlc_mutex_lock(&segment->lock);
>                 segment->sequence = p->sequence;
>                 segment->duration = p->duration;
>                 free(segment->uri);
> @@ -1336,7 +1330,6 @@ static int hls_UpdatePlaylist(stream_t *s, hls_stream_t *hls_new, hls_stream_t *
>                 segment->psz_key_path = p->psz_key_path?strdup(p->psz_key_path):NULL;
>                 vlc_mutex_unlock(&segment->lock);
>                 segment_Free(p);
> -                free(psz_url);
>             }
>         }
>         else
> --
> 1.7.8.3
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> http://mailman.videolan.org/listinfo/vlc-devel



More information about the vlc-devel mailing list