From 0bbcd3880588c5c82f4f19f9465fb2332ea6e0a8 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Fri, 21 May 2021 16:24:02 +0200 Subject: [PATCH] Fix invalid memory access introduced in 6f832724ef942f133f6f8d0a06d7377beea8f7a6 --- src/lib/ffmpeg_examiner.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/ffmpeg_examiner.cc b/src/lib/ffmpeg_examiner.cc index a793c7b98..bd6a9b20d 100644 --- a/src/lib/ffmpeg_examiner.cc +++ b/src/lib/ffmpeg_examiner.cc @@ -69,7 +69,7 @@ FFmpegExaminer::FFmpegExaminer (shared_ptr c, shared_ptrnb_streams; ++i) { auto s = _format_context->streams[i]; - auto codec = _codec_context[i]->codec; + auto codec = _codec_context[i] ? _codec_context[i]->codec : nullptr; if (s->codecpar->codec_type == AVMEDIA_TYPE_AUDIO && codec) { /* This is a hack; sometimes it seems that _audio_codec_context->channel_layout isn't set up, -- 2.30.2