summaryrefslogtreecommitdiff
path: root/libavcodec/aac_parser.c
diff options
context:
space:
mode:
authorAlex Converse <alex.converse@gmail.com>2009-05-13 14:11:11 +0000
committerAlex Converse <alex.converse@gmail.com>2009-05-13 14:11:11 +0000
commitee373ddffd2b2eb223804db5d7c35e692146f7cc (patch)
treecd4c6f19080ba0385722080715c5d58b0c52bcc8 /libavcodec/aac_parser.c
parent171a353159049c120745eea8dd158d2ec04e826c (diff)
downloadffmpeg-ee373ddffd2b2eb223804db5d7c35e692146f7cc.tar.gz
Move the ADTS header size to the parser's header file.
Originally committed as revision 18814 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/aac_parser.c')
-rw-r--r--libavcodec/aac_parser.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/libavcodec/aac_parser.c b/libavcodec/aac_parser.c
index 70d733a9a1..ab8e092dda 100644
--- a/libavcodec/aac_parser.c
+++ b/libavcodec/aac_parser.c
@@ -26,8 +26,6 @@
#include "get_bits.h"
#include "mpeg4audio.h"
-#define AAC_HEADER_SIZE 7
-
int ff_aac_parse_header(GetBitContext *gbc, AACADTSHeaderInfo *hdr)
{
int size, rdb, ch, sr;
@@ -56,7 +54,7 @@ int ff_aac_parse_header(GetBitContext *gbc, AACADTSHeaderInfo *hdr)
skip_bits1(gbc); /* copyright_identification_bit */
skip_bits1(gbc); /* copyright_identification_start */
size = get_bits(gbc, 13); /* aac_frame_length */
- if(size < AAC_HEADER_SIZE)
+ if(size < AAC_ADTS_HEADER_SIZE)
return AAC_AC3_PARSE_ERROR_FRAME_SIZE;
skip_bits(gbc, 11); /* adts_buffer_fullness */
@@ -86,7 +84,7 @@ static int aac_sync(uint64_t state, AACAC3ParseContext *hdr_info,
} tmp;
tmp.u64 = be2me_64(state);
- init_get_bits(&bits, tmp.u8+8-AAC_HEADER_SIZE, AAC_HEADER_SIZE * 8);
+ init_get_bits(&bits, tmp.u8+8-AAC_ADTS_HEADER_SIZE, AAC_ADTS_HEADER_SIZE * 8);
if ((size = ff_aac_parse_header(&bits, &hdr)) < 0)
return 0;
@@ -102,7 +100,7 @@ static int aac_sync(uint64_t state, AACAC3ParseContext *hdr_info,
static av_cold int aac_parse_init(AVCodecParserContext *s1)
{
AACAC3ParseContext *s = s1->priv_data;
- s->header_size = AAC_HEADER_SIZE;
+ s->header_size = AAC_ADTS_HEADER_SIZE;
s->sync = aac_sync;
return 0;
}