diff options
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)]; } |
