aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-04-06 04:20:51 +0200
committerMichael Niedermayer <michaelni@gmx.at>2015-04-11 22:01:46 +0200
commitac07ab7db78dacc916239693dd7d724605989aa1 (patch)
tree1c6dab178a1757532835276795701c67ca65092d /libavformat
parent9bff35abde6737686ba150c9b8a65d2883123153 (diff)
downloadffmpeg-ac07ab7db78dacc916239693dd7d724605989aa1.tar.gz
avformat/utils: avoid discarded streams in av_find_default_stream_index()
Fixes Ticket2010 Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit ff6841c6bb2d35f8d461419e45d59be7542d03fe) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/utils.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 17ae300a8f..1467f31b1e 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;