fix crash by using the correct FormatContext when dumping stream info

This commit is contained in:
Isaac Connor 2021-04-11 12:44:59 -04:00
parent f50bfab0aa
commit 526b44b377
1 changed files with 1 additions and 1 deletions

View File

@ -540,7 +540,7 @@ int FfmpegCamera::OpenFfmpeg() {
mAudioCodecContext = mAudioStream->codec;
#endif
zm_dump_stream_format(mFormatContext, mAudioStreamId, 0, 0);
zm_dump_stream_format((mSecondFormatContext?mSecondFormatContext:mFormatContext), mAudioStreamId, 0, 0);
// Open the codec
#if !LIBAVFORMAT_VERSION_CHECK(53, 8, 0, 8, 0)
if ( avcodec_open(mAudioCodecContext, mAudioCodec) < 0 )