Commit 6215b898 authored by michael's avatar michael

add vst option to select video stream


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@9800 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 42bc1de6
...@@ -180,6 +180,7 @@ static enum PixelFormat frame_pix_fmt = PIX_FMT_NONE; ...@@ -180,6 +180,7 @@ static enum PixelFormat frame_pix_fmt = PIX_FMT_NONE;
static int audio_disable; static int audio_disable;
static int video_disable; static int video_disable;
static int wanted_audio_stream= 0; static int wanted_audio_stream= 0;
static int wanted_video_stream= 0;
static int seek_by_bytes; static int seek_by_bytes;
static int display_disable; static int display_disable;
static int show_status; static int show_status;
...@@ -1948,7 +1949,7 @@ static int decode_thread(void *arg) ...@@ -1948,7 +1949,7 @@ static int decode_thread(void *arg)
audio_index = i; audio_index = i;
break; break;
case CODEC_TYPE_VIDEO: case CODEC_TYPE_VIDEO:
if (video_index < 0 && !video_disable) if ((video_index < 0 || wanted_video_stream-- > 0) && !video_disable)
video_index = i; video_index = i;
break; break;
default: default:
...@@ -2449,6 +2450,7 @@ const OptionDef options[] = { ...@@ -2449,6 +2450,7 @@ const OptionDef options[] = {
{ "an", OPT_BOOL, {(void*)&audio_disable}, "disable audio" }, { "an", OPT_BOOL, {(void*)&audio_disable}, "disable audio" },
{ "vn", OPT_BOOL, {(void*)&video_disable}, "disable video" }, { "vn", OPT_BOOL, {(void*)&video_disable}, "disable video" },
{ "ast", OPT_INT | HAS_ARG | OPT_EXPERT, {(void*)&wanted_audio_stream}, "", "" }, { "ast", OPT_INT | HAS_ARG | OPT_EXPERT, {(void*)&wanted_audio_stream}, "", "" },
{ "vst", OPT_INT | HAS_ARG | OPT_EXPERT, {(void*)&wanted_video_stream}, "", "" },
{ "ss", HAS_ARG, {(void*)&opt_seek}, "seek to a given position in seconds", "pos" }, { "ss", HAS_ARG, {(void*)&opt_seek}, "seek to a given position in seconds", "pos" },
{ "bytes", OPT_BOOL, {(void*)&seek_by_bytes}, "seek by bytes" }, { "bytes", OPT_BOOL, {(void*)&seek_by_bytes}, "seek by bytes" },
{ "nodisp", OPT_BOOL, {(void*)&display_disable}, "disable graphical display" }, { "nodisp", OPT_BOOL, {(void*)&display_disable}, "disable graphical display" },
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment