aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorXu Guangxin <guangxin.xu@intel.com>2020-08-10 17:34:30 +0800
committerJames Almer <jamrial@gmail.com>2020-08-13 23:48:40 -0300
commit6a941b56913c6766677c56245187268f326e7ad8 (patch)
tree0514c499efe9205719cb8981565d014b3b9fcf3e /libavcodec
parent3c05c8a15f2fa5543213f6c8cbe439ad4376137d (diff)
downloadffmpeg-6a941b56913c6766677c56245187268f326e7ad8.tar.gz
avcodec/av1_parse: use macro for MAX_OBU_HEADER_SIZE
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/av1_parse.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavcodec/av1_parse.h b/libavcodec/av1_parse.h
index 01bcd646c2..ae0ebb5a18 100644
--- a/libavcodec/av1_parse.h
+++ b/libavcodec/av1_parse.h
@@ -27,6 +27,9 @@
#include "avcodec.h"
#include "get_bits.h"
+// OBU header fields + max leb128 length
+#define MAX_OBU_HEADER_SIZE (2 + 8)
+
typedef struct AV1OBU {
/** Size of payload */
int size;
@@ -105,7 +108,7 @@ static inline int parse_obu_header(const uint8_t *buf, int buf_size,
int ret, extension_flag, has_size_flag;
int64_t size;
- ret = init_get_bits8(&gb, buf, FFMIN(buf_size, 2 + 8)); // OBU header fields + max leb128 length
+ ret = init_get_bits8(&gb, buf, FFMIN(buf_size, MAX_OBU_HEADER_SIZE));
if (ret < 0)
return ret;