Message ID | 20181111120006.30561-1-stephen.dawkins@gmail.com |
---|---|
State | New |
Headers | show |
Stephen Dawkins <stephen.dawkins@gmail.com> 于2018年11月11日周日 下午8:07写道: > > This patch removes some duplicate code in hls_start that prevents the usage > of strftime base filenames in conjuction with hls_segment_size. > > Signed-off-by: Stephen Dawkins <stephen.dawkins@gmail.com> > --- > libavformat/hlsenc.c | 13 ------------- > 1 file changed, 13 deletions(-) > > diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c > index f8f060d065..4557951f0b 100644 > --- a/libavformat/hlsenc.c > +++ b/libavformat/hlsenc.c > @@ -1468,19 +1468,6 @@ static int hls_start(AVFormatContext *s, VariantStream *vs) > return AVERROR(ENOMEM); > ff_format_set_url(vtt_oc, new_name); > } > - } else if (c->max_seg_size > 0) { > - char *filename = NULL; > - if (replace_int_data_in_filename(&filename, > -#if FF_API_HLS_WRAP > - vs->basename, 'd', c->wrap ? vs->sequence % c->wrap : vs->sequence) < 1) { > -#else > - vs->basename, 'd', vs->sequence) < 1) { > -#endif > - av_free(filename); > - av_log(oc, AV_LOG_ERROR, "Invalid segment filename template '%s', you can try to use -strftime 1 with it\n", vs->basename); > - return AVERROR(EINVAL); > - } > - ff_format_set_url(oc, filename); > } else { > if (c->use_localtime) { > time_t now0; > -- > 2.19.1 > > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel LGTM Thanks
diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index f8f060d065..4557951f0b 100644 --- a/libavformat/hlsenc.c +++ b/libavformat/hlsenc.c @@ -1468,19 +1468,6 @@ static int hls_start(AVFormatContext *s, VariantStream *vs) return AVERROR(ENOMEM); ff_format_set_url(vtt_oc, new_name); } - } else if (c->max_seg_size > 0) { - char *filename = NULL; - if (replace_int_data_in_filename(&filename, -#if FF_API_HLS_WRAP - vs->basename, 'd', c->wrap ? vs->sequence % c->wrap : vs->sequence) < 1) { -#else - vs->basename, 'd', vs->sequence) < 1) { -#endif - av_free(filename); - av_log(oc, AV_LOG_ERROR, "Invalid segment filename template '%s', you can try to use -strftime 1 with it\n", vs->basename); - return AVERROR(EINVAL); - } - ff_format_set_url(oc, filename); } else { if (c->use_localtime) { time_t now0;
This patch removes some duplicate code in hls_start that prevents the usage of strftime base filenames in conjuction with hls_segment_size. Signed-off-by: Stephen Dawkins <stephen.dawkins@gmail.com> --- libavformat/hlsenc.c | 13 ------------- 1 file changed, 13 deletions(-)