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.
This commit is contained in:
Norihiro Kamae 2021-10-16 12:49:40 +09:00 committed by Jim
parent 85f45a3ef6
commit 499af309b5

View File

@ -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)