summaryrefslogtreecommitdiff
path: root/libavformat/hlsenc.c
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2014-04-29 18:20:17 +0200
committerLuca Barbato <lu_zero@gentoo.org>2014-04-30 17:52:49 +0200
commit7266e24f176389d2e81bfc7c829934f7c8ae361c (patch)
treeeb2f6f9ad7146071fc759cd50cd2cd906d7a8c1f /libavformat/hlsenc.c
parenta16431034d9bd44182bf844d6bbde2c98bc4e6b5 (diff)
hls: Sync the file number with the start sequence
Diffstat (limited to 'libavformat/hlsenc.c')
-rw-r--r--libavformat/hlsenc.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index 79820f0256..d36d3fb65e 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;