[vlc-commits] httplive: check segment gap on last segment number instead of the segment number of last playlist load
Ilkka Ollakka
git at videolan.org
Tue Aug 27 14:41:57 CEST 2013
vlc/vlc-2.1 | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Mon Aug 26 16:08:23 2013 +0300| [687aeec71c8029a00604a3b61ee39cd136aedea7] | committer: Jean-Baptiste Kempf
httplive: check segment gap on last segment number instead of the segment number of last playlist load
(cherry picked from commit 7fa797f3ec9ef00f1f03d531687b40cab582ba9e)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.1.git/?a=commit;h=687aeec71c8029a00604a3b61ee39cd136aedea7
---
modules/stream_filter/httplive.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/modules/stream_filter/httplive.c b/modules/stream_filter/httplive.c
index 0512516..59d712a 100644
--- a/modules/stream_filter/httplive.c
+++ b/modules/stream_filter/httplive.c
@@ -733,7 +733,9 @@ static int parse_MediaSequence(stream_t *s, hls_stream_t *hls, char *p_read)
if (s->p_sys->b_live)
{
hls_stream_t *last = hls_GetLast(s->p_sys->hls_stream);
- if ((last->sequence < sequence) && (sequence - last->sequence != 1))
+ segment_t *last_segment = segment_GetSegment( last, vlc_array_count( last->segments ) - 1 );
+ if ( ( last_segment->sequence < sequence) &&
+ ( sequence - last_segment->sequence >= 1 ))
msg_Err(s, "EXT-X-MEDIA-SEQUENCE gap in playlist (new=%d, old=%d)",
sequence, last->sequence);
}
More information about the vlc-commits
mailing list