summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2024-02-27 12:34:49 -0600
committerDudemanguy <random342@airmail.cc>2024-03-02 16:32:11 +0000
commit1a649afbad266ae69f2097156fcf74c0f7fda8ac (patch)
tree6c7058c08f03cf82f4c82a49d92bff9eaeb1f5d3
parent9325ebe8173823fec00bf630780f5d8cf656b2b5 (diff)
downloadmpv-1a649afbad266ae69f2097156fcf74c0f7fda8ac.tar.bz2
mpv-1a649afbad266ae69f2097156fcf74c0f7fda8ac.tar.xz
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 6f8c953042a7a964686e5923f5c61025ef6b842e. 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.
-rw-r--r--demux/demux_lavf.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/demux/demux_lavf.c b/demux/demux_lavf.c
index ec26beab54..bb7b38f9a8 100644
--- a/demux/demux_lavf.c
+++ b/demux/demux_lavf.c
@@ -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;