提交 38c9c38b 编写于 作者: P Palana

obs-ffmpeg: Set mux output context filename

This enables e.g. the HLS muxer to output all files in the same directory, with
appropriate names
上级 5548e621
......@@ -438,6 +438,10 @@ static inline bool ffmpeg_mux_get_extra_data(struct ffmpeg_mux *ffm)
return true;
}
#ifdef _MSC_VER
#pragma warning(disable : 4996)
#endif
static inline int open_output_file(struct ffmpeg_mux *ffm)
{
AVOutputFormat *format = ffm->output->oformat;
......@@ -453,6 +457,10 @@ static inline int open_output_file(struct ffmpeg_mux *ffm)
}
}
strncpy(ffm->output->filename, ffm->params.file,
sizeof(ffm->output->filename));
ffm->output->filename[sizeof(ffm->output->filename) - 1] = 0;
ret = avformat_write_header(ffm->output, NULL);
if (ret < 0) {
printf("Error opening '%s': %s",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册