diff options
Diffstat (limited to 'src/lib/ffmpeg_content.cc')
| -rw-r--r-- | src/lib/ffmpeg_content.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/ffmpeg_content.cc b/src/lib/ffmpeg_content.cc index 2c5fcf70e..221a262ef 100644 --- a/src/lib/ffmpeg_content.cc +++ b/src/lib/ffmpeg_content.cc @@ -415,6 +415,10 @@ AVStream * FFmpegStream::stream (AVFormatContext const * fc) const { if (_legacy_id) { + if (id >= int (fc->nb_streams)) { + return 0; + } + return fc->streams[id]; } |
