summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefano Sabatini <stefano.sabatini-lala@poste.it>2009-03-01 17:06:01 +0000
committerStefano Sabatini <stefano.sabatini-lala@poste.it>2009-03-01 17:06:01 +0000
commit5dbb63feefb9070d6fbb5fc16406813f14aa7f9b (patch)
tree38a51ff62fd967f022f7024b4b7b6d0d6483cbbe
parent5ad4f0d473f41360065bdf272d245c8c6575d12a (diff)
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". Originally committed as revision 17693 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--ffplay.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ffplay.c b/ffplay.c
index b4927c6744..c70f530ea1 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -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: