summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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;