Small optimisation.
authorCarl Hetherington <cth@carlh.net>
Fri, 12 Jun 2015 08:40:31 +0000 (09:40 +0100)
committerCarl Hetherington <cth@carlh.net>
Fri, 12 Jun 2015 08:40:31 +0000 (09:40 +0100)
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);