[FFmpeg-cvslog] avformat/utils: avoid discarded streams in av_find_default_stream_index()

Michael Niedermayer git at videolan.org
Fri Apr 17 15:45:35 CEST 2015


ffmpeg | branch: release/2.5 | Michael Niedermayer <michaelni at gmx.at> | Mon Apr  6 04:20:51 2015 +0200| [8968de6c61935da8942f1d9a152412a7c2d0ddc5] | committer: Michael Niedermayer

avformat/utils: avoid discarded streams in av_find_default_stream_index()

Fixes Ticket2010

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

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

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

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

diff --git a/libavformat/utils.c b/libavformat/utils.c
index 78653d1..1ab8bb6 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -1583,6 +1583,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;



More information about the ffmpeg-cvslog mailing list