Re: [FFmpeg-devel] [PATCH] avformat/hlsenc: fix fmp4_init_filename file name with %v problem
> On Feb 10, 2019, at 12:45, Gyan wrote: > > > > On 19-01-2019 12:33 PM, Steven Liu wrote: >> when set option fmp4_init_filename to init_%v.mp4 >> before patch: >> the init file will be init_%v_0.mp4, init_%v_1.mp4 >> after patch: >> the init file will be init_0.mp4, init_1.mp4 >> >> Reported-By: Gyan Doshi >> Signed-off-by: Steven Liu >> --- >> libavformat/hlsenc.c | 6 +- >> 1 file changed, 5 insertions(+), 1 deletion(-) >> >> diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c >> index ca57694e9e..d98d52a332 100644 >> --- a/libavformat/hlsenc.c >> +++ b/libavformat/hlsenc.c >> @@ -2715,7 +2715,11 @@ static int hls_init(AVFormatContext *s) >> av_strlcpy(vs->fmp4_init_filename, hls->fmp4_init_filename, >> fmp4_init_filename_len); >> if (hls->nb_varstreams > 1) { >> -ret = append_postfix(vs->fmp4_init_filename, >> fmp4_init_filename_len, i); >> +if (av_stristr(vs->fmp4_init_filename, "%v")) { >> +format_name(vs->fmp4_init_filename, >> fmp4_init_filename_len, i); >> +} else { >> +ret = append_postfix(vs->fmp4_init_filename, >> fmp4_init_filename_len, i); >> +} >> if (ret < 0) >> goto fail; >> } > > Steven, ping. Pushed Sorry for the delay, these days are Chinese Spring Festival. > > Gyan > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel Thanks Steven ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avformat/hlsenc: fix fmp4_init_filename file name with %v problem
On 19-01-2019 12:33 PM, Steven Liu wrote: when set option fmp4_init_filename to init_%v.mp4 before patch: the init file will be init_%v_0.mp4, init_%v_1.mp4 after patch: the init file will be init_0.mp4, init_1.mp4 Reported-By: Gyan Doshi Signed-off-by: Steven Liu --- libavformat/hlsenc.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index ca57694e9e..d98d52a332 100644 --- a/libavformat/hlsenc.c +++ b/libavformat/hlsenc.c @@ -2715,7 +2715,11 @@ static int hls_init(AVFormatContext *s) av_strlcpy(vs->fmp4_init_filename, hls->fmp4_init_filename, fmp4_init_filename_len); if (hls->nb_varstreams > 1) { -ret = append_postfix(vs->fmp4_init_filename, fmp4_init_filename_len, i); +if (av_stristr(vs->fmp4_init_filename, "%v")) { +format_name(vs->fmp4_init_filename, fmp4_init_filename_len, i); +} else { +ret = append_postfix(vs->fmp4_init_filename, fmp4_init_filename_len, i); +} if (ret < 0) goto fail; } Steven, ping. Gyan ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] avformat/hlsenc: fix fmp4_init_filename file name with %v problem
when set option fmp4_init_filename to init_%v.mp4 before patch: the init file will be init_%v_0.mp4, init_%v_1.mp4 after patch: the init file will be init_0.mp4, init_1.mp4 Reported-By: Gyan Doshi Signed-off-by: Steven Liu --- libavformat/hlsenc.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index ca57694e9e..d98d52a332 100644 --- a/libavformat/hlsenc.c +++ b/libavformat/hlsenc.c @@ -2715,7 +2715,11 @@ static int hls_init(AVFormatContext *s) av_strlcpy(vs->fmp4_init_filename, hls->fmp4_init_filename, fmp4_init_filename_len); if (hls->nb_varstreams > 1) { -ret = append_postfix(vs->fmp4_init_filename, fmp4_init_filename_len, i); +if (av_stristr(vs->fmp4_init_filename, "%v")) { +format_name(vs->fmp4_init_filename, fmp4_init_filename_len, i); +} else { +ret = append_postfix(vs->fmp4_init_filename, fmp4_init_filename_len, i); +} if (ret < 0) goto fail; } -- 2.15.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel