mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-28 14:01:27 +00:00
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
This commit is contained in:
parent
5ad4f0d473
commit
5dbb63feef
4
ffplay.c
4
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:
|
||||
|
Loading…
Reference in New Issue
Block a user