Explorar o código

obs-ffmpeg/ffmpeg-mux: Fix failing when no video

(Jim: Technically this should never be used without video)

Closes jp9000/obs-studio#795
Lionheart Zhang %!s(int64=8) %!d(string=hai) anos
pai
achega
5ade7f74f2
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      plugins/obs-ffmpeg/ffmpeg-mux/ffmpeg-mux.c

+ 2 - 1
plugins/obs-ffmpeg/ffmpeg-mux/ffmpeg-mux.c

@@ -355,7 +355,8 @@ static void create_audio_stream(struct ffmpeg_mux *ffm, int idx)
 
 static bool init_streams(struct ffmpeg_mux *ffm)
 {
-	create_video_stream(ffm);
+	if (ffm->params.has_video)
+		create_video_stream(ffm);
 
 	if (ffm->params.tracks) {
 		ffm->audio_streams =