[FFmpeg-cvslog] r17693 - trunk/ffplay.c

stefano subversion
Sun Mar 1 18:06:02 CET 2009


Author: stefano
Date: Sun Mar  1 18:06:01 2009
New Revision: 17693

Log:
Apply the same logic used for subtitle stream selection to audio and video 
stream selection.

Make the counting starts from 0, and disable the corresponding playbck
when the selected stream number is negative.

See the thread:
" [FFmpeg-devel] [PATCH] Add documentation for -ast, -vst, -sst".

Modified:
   trunk/ffplay.c

Modified: trunk/ffplay.c
==============================================================================
--- trunk/ffplay.c	Sun Mar  1 18:02:21 2009	(r17692)
+++ trunk/ffplay.c	Sun Mar  1 18:06:01 2009	(r17693)
@@ -1974,11 +1974,11 @@ static int decode_thread(void *arg)
         ic->streams[i]->discard = AVDISCARD_ALL;
         switch(enc->codec_type) {
         case CODEC_TYPE_AUDIO:
-            if ((audio_index < 0 || wanted_audio_stream-- > 0) && !audio_disable)
+            if (wanted_audio_stream-- >= 0 && !audio_disable)
                 audio_index = i;
             break;
         case CODEC_TYPE_VIDEO:
-            if ((video_index < 0 || wanted_video_stream-- > 0) && !video_disable)
+            if (wanted_video_stream-- >= 0 && !video_disable)
                 video_index = i;
             break;
         case CODEC_TYPE_SUBTITLE:




More information about the ffmpeg-cvslog mailing list