Fix some coverity-reported stuff.
[dcpomatic.git] / src / lib / ffmpeg.cc
index d3653e311fdfadeabe97d9a3898d5fe0c835fb36..b7ae04b069017d8404325939fdbbad8ba4108f26 100644 (file)
@@ -146,7 +146,8 @@ void
 FFmpeg::setup_video ()
 {
        boost::mutex::scoped_lock lm (_mutex);
-       
+
+       assert (_video_stream >= 0);
        AVCodecContext* context = _format_context->streams[_video_stream]->codec;
        AVCodec* codec = avcodec_find_decoder (context->codec_id);