Small optimisation.
[dcpomatic.git] / src / lib / ffmpeg_decoder.cc
index b7516f6d2d7a7cb005e08dd617e4b0a7f370146f..416ac02484ab6bbdee295aab0c403c2956e89b4e 100644 (file)
@@ -162,10 +162,10 @@ FFmpegDecoder::pass (PassReason reason)
 
        if (si == _video_stream && !_ignore_video && reason != PASS_REASON_SUBTITLE) {
                decode_video_packet ();
-       } else if (reason != PASS_REASON_SUBTITLE) {
-               decode_audio_packet ();
        } else if (fc->subtitle_stream() && fc->subtitle_stream()->uses_index (_format_context, si)) {
                decode_subtitle_packet ();
+       } else if (reason != PASS_REASON_SUBTITLE) {
+               decode_audio_packet ();
        }
 
        av_free_packet (&_packet);