]> git.sesse.net Git - vlc/commitdiff
stream_filter/httplive.c: segment->sequence was of by one
authorJean-Paul Saman <jean-paul.saman@m2x.nl>
Tue, 7 Dec 2010 15:15:11 +0000 (16:15 +0100)
committerJean-Paul Saman <jean-paul.saman@m2x.nl>
Tue, 14 Dec 2010 09:59:42 +0000 (10:59 +0100)
The value for segment->sequence is of by one. It is specified to start
at 0 and the code lets it start by 1.

modules/stream_filter/httplive.c

index d57defcad781d3dd74407c6e06ce7f53e820684e..16b84809341801e0830ad5542b4b7879f3b2a452 100644 (file)
@@ -381,7 +381,7 @@ static void parse_SegmentInformation(stream_t *s, hls_stream_t *hls, char *p_rea
     vlc_mutex_lock(&hls->lock);
     segment_t *segment = segment_New(hls, duration, psz_uri ? psz_uri : uri);
     if (segment)
-        segment->sequence = hls->sequence + vlc_array_count(hls->segments);
+        segment->sequence = hls->sequence + vlc_array_count(hls->segments) - 1;
     if (duration > hls->duration)
     {
         msg_Err(s, "EXTINF:%d duration is larger then EXT-X-TARGETDURATION:%d",