diff options
author | Måns Rullgård <mans@mansr.com> | 2006-06-16 20:41:33 +0000 |
---|---|---|
committer | Måns Rullgård <mans@mansr.com> | 2006-06-16 20:41:33 +0000 |
commit | 4f8ff17e7597584a6dc581b427a47615afb5bf3a (patch) | |
tree | 304fb0d433745e65d1f80faa67081c909b194f98 /libavcodec/parser.c | |
parent | 57bd82d4e75bf1542d92e7df9edbdcf18f324be1 (diff) | |
download | ffmpeg-streaming-4f8ff17e7597584a6dc581b427a47615afb5bf3a.zip ffmpeg-streaming-4f8ff17e7597584a6dc581b427a47615afb5bf3a.tar.gz |
The AAC frame header uses 13 bits for the frame size, so the buffer should
have room for such a frame. A frame that large seems unlikely in a valid
file, but leaving room for it spares us the need to check it elsewhere.
Moving the buffer to the end of the struct made debugging this easier.
Originally committed as revision 5487 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/parser.c')
-rw-r--r-- | libavcodec/parser.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/parser.c b/libavcodec/parser.c index 91f6782..7281516 100644 --- a/libavcodec/parser.c +++ b/libavcodec/parser.c @@ -729,12 +729,12 @@ static int mpegaudio_parse(AVCodecParserContext *s1, /* also used for ADTS AAC */ typedef struct AC3ParseContext { - uint8_t inbuf[4096]; /* input buffer */ uint8_t *inbuf_ptr; int frame_size; int header_size; int (*sync)(const uint8_t *buf, int *channels, int *sample_rate, int *bit_rate, int *samples); + uint8_t inbuf[8192]; /* input buffer */ } AC3ParseContext; #define AC3_HEADER_SIZE 7 |