Commit 60873bf9 authored by Anssi Hannula's avatar Anssi Hannula

avformat/utils: Fix find_stream_info not considering the extradata it found

Commit 9200514a ("lavf: replace AVStream.codec with
AVStream.codecpar") merged in commit 6f69f7a8 changed
avformat_find_stream_info() to put the extradata it got from
st->parser->parser->split() to st->internal->avctx instead of st->codec
(extradata in st->internal->avctx will be later copied to st->codecpar).

However, in the same function, the "is stream ready?" check was changed
to check for extradata in st->codecpar instead of st->codec, even
though st->codecpar is not yet updated at that point.

Extradata retrieved from split() is therefore not considered anymore,
and avformat_find_stream_info() will therefore needlessly continue
probing in some cases.

Fix that by checking for the extradata at st->internal->avctx where it
is actually put.
parent c26305f6
...@@ -3432,7 +3432,7 @@ FF_ENABLE_DEPRECATION_WARNINGS ...@@ -3432,7 +3432,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
break; break;
} }
if (st->parser && st->parser->parser->split && if (st->parser && st->parser->parser->split &&
!st->codecpar->extradata) !st->internal->avctx->extradata)
break; break;
if (st->first_dts == AV_NOPTS_VALUE && if (st->first_dts == AV_NOPTS_VALUE &&
!(ic->iformat->flags & AVFMT_NOTIMESTAMPS) && !(ic->iformat->flags & AVFMT_NOTIMESTAMPS) &&
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment