aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/utils.c
diff options
context:
space:
mode:
authorMarton Balint <cus@passwd.hu>2011-02-20 01:18:49 +0100
committerAnton Khirnov <anton@khirnov.net>2011-05-12 18:02:27 +0200
commit6b35a795f8ca34c92da8de81f7b20b2d47d71468 (patch)
tree85b4e421142902655026b6996882c1db5fb3de6a /libavformat/utils.c
parent5da116a3fde9013846bd7b385cdde5ce2951869c (diff)
downloadffmpeg-6b35a795f8ca34c92da8de81f7b20b2d47d71468.tar.gz
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@gmx.at> Signed-off-by: Anton Khirnov <anton@khirnov.net>
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r--libavformat/utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 7959102e0a..830e5d03c2 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;