summaryrefslogtreecommitdiff
path: root/src/lib/ffmpeg.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2022-10-27 22:22:07 +0200
committerCarl Hetherington <cth@carlh.net>2025-12-29 17:31:35 +0100
commit6edac68a2309b213ee2c83c3d917d005210d5124 (patch)
tree53e01509bff3d56be67642a1da858daef80cc6ea /src/lib/ffmpeg.cc
parent407cde5dc304588a1e60252f0813aff44bfa2ed5 (diff)
Diffstat (limited to 'src/lib/ffmpeg.cc')
-rw-r--r--src/lib/ffmpeg.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/ffmpeg.cc b/src/lib/ffmpeg.cc
index d7c741d09..59cde70cf 100644
--- a/src/lib/ffmpeg.cc
+++ b/src/lib/ffmpeg.cc
@@ -213,11 +213,12 @@ FFmpeg::setup_decoder(int stream_index)
AVCodecContext *
FFmpeg::video_codec_context () const
{
- if (!_video_stream) {
+ auto str = _ffmpeg_content->video_stream();
+ if (!str) {
return nullptr;
}
- return _codec_context[_video_stream.get()];
+ return _codec_context[str->index(_format_context)];
}