[FFmpeg-cvslog] lavf: fix av_find_best_stream when decoder_ret is given and using a related stream .

Marton Balint git at videolan.org
Fri May 13 04:46:00 CEST 2011


ffmpeg | branch: master | Marton Balint <cus at passwd.hu> | Sun Feb 20 01:18:49 2011 +0100| [6b35a795f8ca34c92da8de81f7b20b2d47d71468] | committer: Anton Khirnov

lavf: fix av_find_best_stream when decoder_ret is given and using a related stream.

Yet another fix for the code originally designed for use without related_stream.

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
Signed-off-by: Anton Khirnov <anton at khirnov.net>

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

 libavformat/utils.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavformat/utils.c b/libavformat/utils.c
index 7959102..830e5d0 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -2484,7 +2484,7 @@ int av_find_best_stream(AVFormatContext *ic,
         if (st->disposition & (AV_DISPOSITION_HEARING_IMPAIRED|AV_DISPOSITION_VISUAL_IMPAIRED))
             continue;
         if (decoder_ret) {
-            decoder = avcodec_find_decoder(ic->streams[i]->codec->codec_id);
+            decoder = avcodec_find_decoder(st->codec->codec_id);
             if (!decoder) {
                 if (ret < 0)
                     ret = AVERROR_DECODER_NOT_FOUND;



More information about the ffmpeg-cvslog mailing list