]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/avcodec: Add codec_tags array to AVCodec
authorMichael Niedermayer <michael@niedermayer.cc>
Sun, 29 Dec 2019 20:22:05 +0000 (21:22 +0100)
committerMichael Niedermayer <michael@niedermayer.cc>
Wed, 22 Jan 2020 20:50:49 +0000 (21:50 +0100)
This allows the fuzzer to target meaningfull codec tags instead
of hunting the 4gb space, which it seems to have problems with.

Suggested-by: James
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/avcodec.h
libavcodec/internal.h

index 4b0e7c085352db434c60b4aa3413a8a015ef944c..774ed1e6412e40cc7955122d00058440a2b0d914 100644 (file)
@@ -3644,6 +3644,11 @@ typedef struct AVCodec {
      * The user can only access this field via avcodec_get_hw_config().
      */
     const struct AVCodecHWConfigInternal **hw_configs;
+
+    /**
+     * List of supported codec_tags, terminated by FF_CODEC_TAGS_END.
+     */
+    const uint32_t *codec_tags;
 } AVCodec;
 
 #if FF_API_CODEC_GET_SET
index 5930dd0da016a45f0e04887f4fd69a6271c8db0c..4188d1c46f901f028ecb9ac95760966ba6cade9c 100644 (file)
  */
 #define FF_CODEC_CAP_SLICE_THREAD_HAS_MF    (1 << 5)
 
+/**
+ * AVCodec.codec_tags termination value
+ */
+#define FF_CODEC_TAGS_END -1
+
+
 #ifdef TRACE
 #   define ff_tlog(ctx, ...) av_log(ctx, AV_LOG_TRACE, __VA_ARGS__)
 #else