aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-04-06 04:20:51 +0200
committerMichael Niedermayer <michaelni@gmx.at>2015-04-06 04:31:29 +0200
commitff6841c6bb2d35f8d461419e45d59be7542d03fe (patch)
treec64fcc565b47cfe96889c470bced8bc1fe0feb16
parentba54512a10f88e21c26bb71bd64b12fa5d68b036 (diff)
downloadffmpeg-ff6841c6bb2d35f8d461419e45d59be7542d03fe.tar.gz
avformat/utils: avoid discarded streams in av_find_default_stream_index()
Fixes Ticket2010 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/utils.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 6eec7a1530..122fc1fdc4 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -1597,6 +1597,9 @@ int av_find_default_stream_index(AVFormatContext *s)
score += 50;
}
+ if (st->discard != AVDISCARD_ALL)
+ score += 200;
+
if (score > best_score) {
best_score = score;
best_stream = i;