diff mbox series

[FFmpeg-devel] libavformat/adtsenc: Increase ADTS_MAX_FRAME_BYTES from 8k to 16k

Message ID 20210425164729.11701-1-chris.ribble@resi.io
State Accepted
Commit c9fed043f106e7475d086f89b32a37cc4d2a7269
Headers show
Series [FFmpeg-devel] libavformat/adtsenc: Increase ADTS_MAX_FRAME_BYTES from 8k to 16k | expand

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

Chris Ribble April 25, 2021, 4:47 p.m. UTC
ADTS frames may contain up to 768 bytes per channel. With 16 channels,
this is 12k, which cannot fit into the maximum 8k buffer.

Signed-off-by: Chris Ribble <chris.ribble@resi.io>
---
 libavformat/adtsenc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Lynne April 25, 2021, 5:19 p.m. UTC | #1
Apr 25, 2021, 18:47 by chris.ribble@resi.io:

> ADTS frames may contain up to 768 bytes per channel. With 16 channels,
> this is 12k, which cannot fit into the maximum 8k buffer.
>

Math checked out, pushed, thanks.
diff mbox series

Patch

diff --git a/libavformat/adtsenc.c b/libavformat/adtsenc.c
index 3595cb3bb2..ae1b1b364c 100644
--- a/libavformat/adtsenc.c
+++ b/libavformat/adtsenc.c
@@ -44,7 +44,7 @@  typedef struct ADTSContext {
     uint8_t pce_data[MAX_PCE_SIZE];
 } ADTSContext;
 
-#define ADTS_MAX_FRAME_BYTES ((1 << 13) - 1)
+#define ADTS_MAX_FRAME_BYTES ((1 << 14) - 1)
 
 static int adts_decode_extradata(AVFormatContext *s, ADTSContext *adts, const uint8_t *buf, int size)
 {