1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

hls: Sync the file number with the start sequence

This commit is contained in:
Luca Barbato 2014-04-29 18:20:17 +02:00
parent a16431034d
commit 7266e24f17

View File

@ -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;