[FFmpeg-devel] [PATCH] avformat/utils: Fix find_stream_info not considering the extradata it found

Michael Niedermayer michael at niedermayer.cc
Tue Jul 26 17:59:36 EEST 2016


On Tue, Jul 26, 2016 at 03:56:13PM +0300, Anssi Hannula wrote:
> Commit 9200514ad8717c6 ("lavf: replace AVStream.codec with
> AVStream.codecpar") merged in commit 6f69f7a8bf6a0d01 changed
> avformat_find_stream_info() to put the extradata it got from
> st->parser->parser->split() to st->internal->avctx instead of st->codec
> (from where it 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.
> 
> 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.
> 
> ---
> 
> Michael Niedermayer wrote:
> > seems to break fate here:
> [...]
> 
> Oops, seems I messed up running fate and missed the "warning: only a
> subset of the fate tests will be run because SAMPLES is not specified"
> warning it gave... Thanks for catching that.
> 
> Seems this reverse fix is actually needed, as extradata is actually
> copied in the other direction (from st->internal->avctx to
> st->codecpar).

it seems this causes some changes, quite possibly thats simply due to
less packets being read

libavformat/tests/seek Matrix.Reloaded.Trailer-640x346-XviD-1.0beta2-HE_AAC_subtitled.mkv -duration 400
with http://samples.ffmpeg.org/Matroska/matrix/Matrix.Reloaded.Trailer-640x346-XviD-1.0beta2-HE_AAC_subtitled.mkv

for tickets//2254/ttvHD_vlc_sample.ts the tbr changes from
1001/30000 to 1/30

are these in intended / expected ?

I can confirm that this reduces the amount of data read in many files

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Democracy is the form of government in which you can choose your dictator
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160726/f22313cf/attachment.sig>


More information about the ffmpeg-devel mailing list