Commit ecc5addf authored by Jean-Paul Saman's avatar Jean-Paul Saman

stream_filter/httplive.c: Append new segment any (HLS Live playback) when gap...

stream_filter/httplive.c: Append new segment any (HLS Live playback) when gap in sequence numbers is detected.

When a gap in segment sequence numbers is detected append the new one
anyway, since there is nothing that can be done to restore the missing
information. It will result in a playback hickup, but that cannot be
helped. Instead only complain loudly.
parent 738a285d
...@@ -962,17 +962,13 @@ static int hls_UpdatePlaylist(stream_t *s, hls_stream_t *hls_new, hls_stream_t * ...@@ -962,17 +962,13 @@ static int hls_UpdatePlaylist(stream_t *s, hls_stream_t *hls_new, hls_stream_t *
segment_t *l = segment_GetSegment(*hls, last); segment_t *l = segment_GetSegment(*hls, last);
if (l == NULL) goto fail_and_unlock; if (l == NULL) goto fail_and_unlock;
if ((l->sequence + 1) == p->sequence) if ((l->sequence + 1) != p->sequence)
{ {
vlc_array_append((*hls)->segments, p); msg_Err(s, "gap in sequence numbers found: new=%d expected %d",
msg_Info(s, "- segment %d appended", p->sequence); p->sequence, l->sequence+1);
}
else /* there is a gap */
{
msg_Err(s, "gap in sequence numbers found: new=%d expected old=%d",
p->sequence, l->sequence);
goto fail_and_unlock;
} }
vlc_array_append((*hls)->segments, p);
msg_Info(s, "- segment %d appended", p->sequence);
} }
vlc_mutex_unlock(&(*hls)->lock); vlc_mutex_unlock(&(*hls)->lock);
} }
......
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