demux_lavf: always find stream info for avif files

avif files will commonly be probed as "mov,mp4,m4a,3gp,3g2,mj2" by
ffmpeg, but demux_lavf currently has some logic to skip
avformat_find_stream_info for these kinds of files. It was introduced in
6f8c953042. Presumably, the optimization
of mentioned in that commit is still valid however for avif we
specifically need to do the avformat_find_stream_info call. Without it,
several codec proprieties like width, height, etc. are unavailable. So
just check the extension type and disable the skipinfo optimization.
This commit is contained in:
Dudemanguy 2024-02-27 12:34:49 -06:00
parent 9325ebe817
commit 1a649afbad
1 changed files with 4 additions and 0 deletions

View File

@ -510,6 +510,10 @@ static int lavf_check_file(demuxer_t *demuxer, enum demux_check check)
break;
}
// AVIF always needs to find stream info
if (bstrcasecmp0(ext, "avif") == 0)
priv->format_hack.skipinfo = false;
if (score >= lavfdopts->probescore)
break;