[FFmpeg-devel] [PATCH] avformat/utils: do not fallback to av1dec for probing

Timo Rothenpieler timo at rothenpieler.org
Tue Oct 6 16:36:41 EEST 2020


---
 libavformat/utils.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libavformat/utils.c b/libavformat/utils.c
index a2e701ea1a..871e655e13 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -222,6 +222,10 @@ static const AVCodec *find_probe_decoder(AVFormatContext *s, const AVStream *st,
         while ((probe_codec = av_codec_iterate(&iter))) {
             if (probe_codec->id == codec->id &&
                     av_codec_is_decoder(probe_codec) &&
+                    /* The av1 "decoder" exists purely for hwaccel purposes.
+                     * It cannot probe on its own and causes an error if it tries.
+                     * Remove this check if av1dec ever gains software decode support. */
+                    strcmp(probe_codec->name, "av1") &&
                     !(probe_codec->capabilities & (AV_CODEC_CAP_AVOID_PROBING | AV_CODEC_CAP_EXPERIMENTAL))) {
                 return probe_codec;
             }
-- 
2.25.1



More information about the ffmpeg-devel mailing list