mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-25 08:42:39 +00:00
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>
This commit is contained in:
parent
9f720d5f9a
commit
fa14610df5
@ -2520,7 +2520,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;
|
||||
|
Loading…
Reference in New Issue
Block a user