ffmpeg | branch: release/2.4 | Michael Niedermayer <michae...@gmx.at> | Mon Apr 
 6 04:20:51 2015 +0200| [d7071efae4a285dd3bd40d21aee00f13d044b339] | committer: 
Michael Niedermayer

avformat/utils: avoid discarded streams in av_find_default_stream_index()

Fixes Ticket2010

Signed-off-by: Michael Niedermayer <michae...@gmx.at>
(cherry picked from commit ff6841c6bb2d35f8d461419e45d59be7542d03fe)

Signed-off-by: Michael Niedermayer <michae...@gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d7071efae4a285dd3bd40d21aee00f13d044b339
---

 libavformat/utils.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavformat/utils.c b/libavformat/utils.c
index ac68a13..0b20b09 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -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;

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

Reply via email to