diff options
| author | Carl Hetherington <cth@carlh.net> | 2022-10-27 22:22:07 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2025-12-29 17:31:35 +0100 |
| commit | 6edac68a2309b213ee2c83c3d917d005210d5124 (patch) | |
| tree | 53e01509bff3d56be67642a1da858daef80cc6ea /src/lib/ffmpeg.cc | |
| parent | 407cde5dc304588a1e60252f0813aff44bfa2ed5 (diff) | |
wip: hacks2252-multi-stream
Diffstat (limited to 'src/lib/ffmpeg.cc')
| -rw-r--r-- | src/lib/ffmpeg.cc | 5 |
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)]; } |
