summaryrefslogtreecommitdiffstats
path: root/libmpdemux
diff options
context:
space:
mode:
authorUoti Urpala <uau@mplayer2.org>2011-03-31 00:57:31 +0300
committerUoti Urpala <uau@mplayer2.org>2011-03-31 03:44:37 +0300
commitcb4394aea32b126e410cc436aae9588cde140147 (patch)
treefe7d32efa780012d81009a81c31d137609b2a5b9 /libmpdemux
parent5949f5b9fdf70d5341fdc38b14817e1ba111a550 (diff)
downloadmpv-cb4394aea32b126e410cc436aae9588cde140147.tar.bz2
mpv-cb4394aea32b126e410cc436aae9588cde140147.tar.xz
demux_lavf: fix initial "-vid"-based video selection
In 59058b54a73809866476b243d8bee82174fb4de8 (from svn r31129) Aurelien changed demux_lavf -vid indexing, but failed to change the initial video stream selection based on -vid to match. Fix.
Diffstat (limited to 'libmpdemux')
-rw-r--r--libmpdemux/demux_lavf.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libmpdemux/demux_lavf.c b/libmpdemux/demux_lavf.c
index e2fd964ae1..4c6ddac2a7 100644
--- a/libmpdemux/demux_lavf.c
+++ b/libmpdemux/demux_lavf.c
@@ -428,7 +428,8 @@ static void handle_stream(demuxer_t *demuxer, AVFormatContext *avfc, int i) {
int biClrUsed;
int biClrImportant;
*/
- if(demuxer->video->id != i && demuxer->video->id != -1)
+ if(demuxer->video->id != priv->video_streams
+ && demuxer->video->id != -1)
st->discard= AVDISCARD_ALL;
else{
demuxer->video->id = i;