From fdcdfd2b35c50cd292da6da9b783fa002df3c13e Mon Sep 17 00:00:00 2001 From: dec05eba Date: Wed, 22 Feb 2023 09:45:06 +0100 Subject: Fix broken video because of broken audio, most noticably in replay --- src/main.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/main.cpp b/src/main.cpp index e444f18..b55b161 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1362,7 +1362,16 @@ int main(int argc, char **argv) { audio_devices.push_back(std::move(audio_device)); } - audio_tracks.push_back({ audio_codec_context, audio_frame, audio_stream, std::move(audio_devices), graph, sink, audio_stream_index }); + AudioTrack audio_track; + audio_track.codec_context = audio_codec_context; + audio_track.frame = audio_frame; + audio_track.stream = audio_stream; + audio_track.audio_devices = std::move(audio_devices); + audio_track.graph = graph; + audio_track.sink = sink; + audio_track.pts = 0; + audio_track.stream_index = audio_stream_index; + audio_tracks.push_back(std::move(audio_track)); ++audio_stream_index; } -- cgit v1.2.3