From 79d60a7d5ec3e7a978887dc358b169bce7fd4bce Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Fri, 21 Feb 2014 09:51:34 +0000 Subject: Small cleanup. --- src/lib/ffmpeg_content.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/lib/ffmpeg_content.cc') 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]; } -- cgit v1.2.3