diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-10-07 20:36:09 +0300 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-10-08 11:19:30 +0300 |
commit | e846617b8210fdd8d4a9612e0532c94173f193b1 (patch) | |
tree | 2db47ae23ba3937ec7acaa26040fd81f5b5d4a6e /libavcodec/opus_parse.c | |
parent | a4dc60a2582ae130b89e07d0c1a5aa764c1a3d7e (diff) |
avcodec/opus: Use prefix for defines
Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/opus_parse.c')
-rw-r--r-- | libavcodec/opus_parse.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libavcodec/opus_parse.c b/libavcodec/opus_parse.c index 39765c5b79..e922d1f304 100644 --- a/libavcodec/opus_parse.c +++ b/libavcodec/opus_parse.c @@ -128,7 +128,7 @@ int ff_opus_parse_packet(OpusPacket *pkt, const uint8_t *buf, int buf_size, } frame_bytes = end - ptr; - if (frame_bytes > MAX_FRAME_SIZE) + if (frame_bytes > OPUS_MAX_FRAME_SIZE) goto fail; pkt->frame_offset[0] = ptr - buf; pkt->frame_size[0] = frame_bytes; @@ -147,7 +147,7 @@ int ff_opus_parse_packet(OpusPacket *pkt, const uint8_t *buf, int buf_size, } frame_bytes = end - ptr; - if (frame_bytes & 1 || frame_bytes >> 1 > MAX_FRAME_SIZE) + if (frame_bytes & 1 || frame_bytes >> 1 > OPUS_MAX_FRAME_SIZE) goto fail; pkt->frame_offset[0] = ptr - buf; pkt->frame_size[0] = frame_bytes >> 1; @@ -177,7 +177,7 @@ int ff_opus_parse_packet(OpusPacket *pkt, const uint8_t *buf, int buf_size, /* calculate 2nd frame size */ frame_bytes = end - ptr - pkt->frame_size[0]; - if (frame_bytes < 0 || frame_bytes > MAX_FRAME_SIZE) + if (frame_bytes < 0 || frame_bytes > OPUS_MAX_FRAME_SIZE) goto fail; pkt->frame_offset[1] = pkt->frame_offset[0] + pkt->frame_size[0]; pkt->frame_size[1] = frame_bytes; @@ -189,7 +189,7 @@ int ff_opus_parse_packet(OpusPacket *pkt, const uint8_t *buf, int buf_size, padding = (i >> 6) & 0x01; pkt->vbr = (i >> 7) & 0x01; - if (pkt->frame_count == 0 || pkt->frame_count > MAX_FRAMES) + if (pkt->frame_count == 0 || pkt->frame_count > OPUS_MAX_FRAMES) goto fail; /* read padding size */ @@ -239,7 +239,7 @@ int ff_opus_parse_packet(OpusPacket *pkt, const uint8_t *buf, int buf_size, } else { frame_bytes = end - ptr - padding; if (frame_bytes % pkt->frame_count || - frame_bytes / pkt->frame_count > MAX_FRAME_SIZE) + frame_bytes / pkt->frame_count > OPUS_MAX_FRAME_SIZE) goto fail; frame_bytes /= pkt->frame_count; } @@ -258,7 +258,7 @@ int ff_opus_parse_packet(OpusPacket *pkt, const uint8_t *buf, int buf_size, /* total packet duration cannot be larger than 120ms */ pkt->frame_duration = opus_frame_duration[pkt->config]; - if (pkt->frame_duration * pkt->frame_count > MAX_PACKET_DUR) + if (pkt->frame_duration * pkt->frame_count > OPUS_MAX_PACKET_DUR) goto fail; /* set mode and bandwidth */ |