[vlc-commits] stream_filter/httplive.c: Append new segment any (HLS Live playback) when gap in sequence numbers is detected.
Jean-Paul Saman
git at videolan.org
Wed Mar 2 23:51:13 CET 2011
vlc | branch: master | Jean-Paul Saman <jean-paul.saman at m2x.nl> | Fri Feb 25 16:58:03 2011 +0100| [ecc5addfd0d7d2121b31374c1819b31b86d65571] | committer: Jean-Paul Saman
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.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ecc5addfd0d7d2121b31374c1819b31b86d65571
---
modules/stream_filter/httplive.c | 14 +++++---------
1 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/modules/stream_filter/httplive.c b/modules/stream_filter/httplive.c
index 5da0bf6..10370f3 100644
--- a/modules/stream_filter/httplive.c
+++ b/modules/stream_filter/httplive.c
@@ -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);
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_Info(s, "- segment %d appended", p->sequence);
- }
- 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;
+ msg_Err(s, "gap in sequence numbers found: new=%d expected %d",
+ p->sequence, l->sequence+1);
}
+ vlc_array_append((*hls)->segments, p);
+ msg_Info(s, "- segment %d appended", p->sequence);
}
vlc_mutex_unlock(&(*hls)->lock);
}
More information about the vlc-commits
mailing list