obs-ffmpeg: Set FFmpeg AVFormatContext filename

This is used by some muxers that set AVFMT_NOFILE and doesn't seem to
hurt muxers that don't set it; notable this makes the hls muxer output
its m3u8 playlist with the proper filename in the proper directory
This commit is contained in:
Palana 2015-09-16 10:12:36 +02:00
parent 1effaca226
commit d8723dbd40

View File

@ -357,6 +357,10 @@ static inline bool open_output_file(struct ffmpeg_data *data)
}
}
strncpy(data->output->filename, data->config.url,
sizeof(data->output->filename));
data->output->filename[sizeof(data->output->filename) - 1] = 0;
ret = avformat_write_header(data->output, NULL);
if (ret < 0) {
blog(LOG_WARNING, "Error opening '%s': %s",