Bläddra i källkod

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
Palana 10 år sedan
förälder
incheckning
d8723dbd40
1 ändrade filer med 4 tillägg och 0 borttagningar
  1. 4 0
      plugins/obs-ffmpeg/obs-ffmpeg-output.c

+ 4 - 0
plugins/obs-ffmpeg/obs-ffmpeg-output.c

@@ -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",