History

Move the ADTS header size to the parser's header file.

Originally committed as revision 18814 to svn://svn.ffmpeg.org/ffmpeg/trunk

Alex Converse committed 17 years ago

Commit ee373dd1 parent 171a3532 files · +5 −5Browse files

Showing the changes to libavcodec/aac_parser.c (1 of 2 files). Show all

Unified · Split

libavcodec/aac_parser.c+3−5
@@ -26,8 +26,6 @@ · 25 unmodified lines
2626 #include "get_bits.h"
2727 #include "mpeg4audio.h"
2828
29−#define AAC_HEADER_SIZE 7
30−
3129 int ff_aac_parse_header(GetBitContext *gbc, AACADTSHeaderInfo *hdr)
3230 {
3331 int size, rdb, ch, sr;
@@ -56,7 +54,7 @@ int ff_aac_parse_header(GetBitContext *gbc, AACADTSHeaderInfo *hdr) · 22 unmodified lines
5654 skip_bits1(gbc); /* copyright_identification_bit */
5755 skip_bits1(gbc); /* copyright_identification_start */
5856 size = get_bits(gbc, 13); /* aac_frame_length */
59− if(size < AAC_HEADER_SIZE)
57+ if(size < AAC_ADTS_HEADER_SIZE)
6058 return AAC_AC3_PARSE_ERROR_FRAME_SIZE;
6159
6260 skip_bits(gbc, 11); /* adts_buffer_fullness */
@@ -86,7 +84,7 @@ static int aac_sync(uint64_t state, AACAC3ParseContext *hdr_info, · 23 unmodified lines
8684 } tmp;
8785
8886 tmp.u64 = be2me_64(state);
89− init_get_bits(&bits, tmp.u8+8-AAC_HEADER_SIZE, AAC_HEADER_SIZE * 8);
87+ init_get_bits(&bits, tmp.u8+8-AAC_ADTS_HEADER_SIZE, AAC_ADTS_HEADER_SIZE * 8);
9088
9189 if ((size = ff_aac_parse_header(&bits, &hdr)) < 0)
9290 return 0;
@@ -102,7 +100,7 @@ static int aac_sync(uint64_t state, AACAC3ParseContext *hdr_info, · 9 unmodified lines
102100 static av_cold int aac_parse_init(AVCodecParserContext *s1)
103101 {
104102 AACAC3ParseContext *s = s1->priv_data;
105− s->header_size = AAC_HEADER_SIZE;
103+ s->header_size = AAC_ADTS_HEADER_SIZE;
106104 s->sync = aac_sync;
107105 return 0;
108106 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t