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 ff6841c6bb)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2015-04-06 04:20:51 +02:00
parent 81e4b6f11a
commit d7071efae4
1 changed files with 3 additions and 0 deletions

View File

@ -1544,6 +1544,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;