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>
This commit is contained in:
Marton Balint 2011-02-20 01:18:49 +01:00 committed by Anton Khirnov
parent 5da116a3fd
commit 6b35a795f8
1 changed files with 1 additions and 1 deletions

View File

@ -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;