]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/commitdiff
Fix subtitle selection logic, make ffplay select the subtitle stream N
authorstefano <stefano@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Sun, 1 Mar 2009 16:58:59 +0000 (16:58 +0000)
committerstefano <stefano@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Sun, 1 Mar 2009 16:58:59 +0000 (16:58 +0000)
rather than the subtitle stream N-1 when N is not zero.

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@17691 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

ffplay.c

index 18504c550a3e07925ee1a5f9510b78a69524acd0..6d9caf22242d5282737b80c727e095bde149dfd9 100644 (file)
--- a/ffplay.c
+++ b/ffplay.c
@@ -1983,7 +1983,7 @@ static int decode_thread(void *arg)
             break;
         case CODEC_TYPE_SUBTITLE:
             if (wanted_subtitle_stream >= 0 && !video_disable &&
-                    (subtitle_index < 0 || wanted_subtitle_stream-- > 0))
+                    (subtitle_index < 0 || wanted_subtitle_stream-- >= 0))
                 subtitle_index = i;
             break;
         default: