Commit 554a1eca authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit '7266e24f'

* commit '7266e24f':
  hls: Sync the file number with the start sequence

Conflicts:
	libavformat/hlsenc.c
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 5b4c8aac 7266e24f
...@@ -174,7 +174,7 @@ static int hls_start(AVFormatContext *s) ...@@ -174,7 +174,7 @@ static int hls_start(AVFormatContext *s)
int err = 0; int err = 0;
if (av_get_frame_filename(oc->filename, sizeof(oc->filename), 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) {
av_log(oc, AV_LOG_ERROR, "Invalid segment filename template '%s'\n", c->basename); av_log(oc, AV_LOG_ERROR, "Invalid segment filename template '%s'\n", c->basename);
return AVERROR(EINVAL); return AVERROR(EINVAL);
} }
...@@ -198,9 +198,6 @@ static int hls_write_header(AVFormatContext *s) ...@@ -198,9 +198,6 @@ static int hls_write_header(AVFormatContext *s)
const char *pattern = "%d.ts"; const char *pattern = "%d.ts";
int basename_size = strlen(s->filename) + strlen(pattern) + 1; int basename_size = strlen(s->filename) + strlen(pattern) + 1;
hls->number = 0;
hls->sequence = hls->start_sequence; hls->sequence = hls->start_sequence;
hls->recording_time = hls->time * AV_TIME_BASE; hls->recording_time = hls->time * AV_TIME_BASE;
hls->start_pts = AV_NOPTS_VALUE; hls->start_pts = AV_NOPTS_VALUE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment