[FFmpeg-cvslog] hls: Sync the file number with the start sequence

Luca Barbato git at videolan.org
Wed Apr 30 21:44:56 CEST 2014


ffmpeg | branch: master | Luca Barbato <lu_zero at gentoo.org> | Tue Apr 29 18:20:17 2014 +0200| [7266e24f176389d2e81bfc7c829934f7c8ae361c] | committer: Luca Barbato

hls: Sync the file number with the start sequence

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7266e24f176389d2e81bfc7c829934f7c8ae361c
---

 libavformat/hlsenc.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index 79820f0..d36d3fb 100644
--- a/libavformat/hlsenc.c
+++ b/libavformat/hlsenc.c
@@ -173,7 +173,7 @@ static int hls_start(AVFormatContext *s)
     int err = 0;
 
     if (av_get_frame_filename(oc->filename, sizeof(oc->filename),
-                              c->basename, c->wrap ? c->number % c->wrap : c->number) < 0)
+                              c->basename, c->wrap ? c->sequence % c->wrap : c->sequence) < 0)
         return AVERROR(EINVAL);
     c->number++;
 
@@ -195,9 +195,6 @@ static int hls_write_header(AVFormatContext *s)
     const char *pattern = "%d.ts";
     int basename_size = strlen(s->filename) + strlen(pattern) + 1;
 
-    hls->number      = 0;
-
-
     hls->sequence       = hls->start_sequence;
     hls->recording_time = hls->time * AV_TIME_BASE;
     hls->start_pts      = AV_NOPTS_VALUE;



More information about the ffmpeg-cvslog mailing list