提交 9ec1f763 编写于 作者: S Steven Liu

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: NGyan Doshi <ffmpeg@gyani.pro>
Signed-off-by: NSteven Liu <lq@chinaffmpeg.org>
上级 a03885b7
......@@ -2740,7 +2740,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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册