mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-23 19:49:56 +00:00
hlsenc: Don't reset the number variable when wrapping
The counter itself shouldn't be wrapped, since it is used for determining end_pts for the next segment - only wrap the number used for the segment file name. Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
parent
09c93b1b95
commit
9d86bfc259
@ -164,12 +164,10 @@ static int hls_start(AVFormatContext *s)
|
||||
AVFormatContext *oc = c->avf;
|
||||
int err = 0;
|
||||
|
||||
if (c->wrap)
|
||||
c->number %= c->wrap;
|
||||
|
||||
if (av_get_frame_filename(oc->filename, sizeof(oc->filename),
|
||||
c->basename, c->number++) < 0)
|
||||
c->basename, c->wrap ? c->number % c->wrap : c->number) < 0)
|
||||
return AVERROR(EINVAL);
|
||||
c->number++;
|
||||
|
||||
if ((err = avio_open2(&oc->pb, oc->filename, AVIO_FLAG_WRITE,
|
||||
&s->interrupt_callback, NULL)) < 0)
|
||||
|
Loading…
Reference in New Issue
Block a user