Przeglądaj źródła

obs-ffmpeg: Fix unwritten audio-only output

When video is disabled, no audio was sent to the container so that the
audio was not saved. Prior to this change, all audio was discarded until
the first video packet arrives. This change limits to discard audio only
if video is available.
Norihiro Kamae 4 lat temu
rodzic
commit
499af309b5
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      plugins/obs-ffmpeg/obs-ffmpeg-output.c

+ 1 - 1
plugins/obs-ffmpeg/obs-ffmpeg-output.c

@@ -913,7 +913,7 @@ static void receive_audio(void *param, size_t mix_idx, struct audio_data *frame)
 
 	AVCodecContext *context = data->audio_infos[track_order].ctx;
 
-	if (!data->start_timestamp)
+	if (!data->start_timestamp && data->video)
 		return;
 
 	if (!output->audio_start_ts)