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
26#include "get_bits.h"26#include "get_bits.h"
27#include "mpeg4audio.h"27#include "mpeg4audio.h"
28 28
29#define AAC_HEADER_SIZE 7
30
31int ff_aac_parse_header(GetBitContext *gbc, AACADTSHeaderInfo *hdr)29int ff_aac_parse_header(GetBitContext *gbc, AACADTSHeaderInfo *hdr)
32{30{
33 int size, rdb, ch, sr;31 int size, rdb, ch, sr;
@@ -56,7 +54,7 @@ int ff_aac_parse_header(GetBitContext *gbc, AACADTSHeaderInfo *hdr) · 22 unmodified lines
56 skip_bits1(gbc); /* copyright_identification_bit */54 skip_bits1(gbc); /* copyright_identification_bit */
57 skip_bits1(gbc); /* copyright_identification_start */55 skip_bits1(gbc); /* copyright_identification_start */
58 size = get_bits(gbc, 13); /* aac_frame_length */56 size = get_bits(gbc, 13); /* aac_frame_length */
59 if(size < AAC_HEADER_SIZE)57 if(size < AAC_ADTS_HEADER_SIZE)
60 return AAC_AC3_PARSE_ERROR_FRAME_SIZE;58 return AAC_AC3_PARSE_ERROR_FRAME_SIZE;
61 59
62 skip_bits(gbc, 11); /* adts_buffer_fullness */60 skip_bits(gbc, 11); /* adts_buffer_fullness */
@@ -86,7 +84,7 @@ static int aac_sync(uint64_t state, AACAC3ParseContext *hdr_info, · 23 unmodified lines
86 } tmp;84 } tmp;
87 85
88 tmp.u64 = be2me_64(state);86 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);
90 88
91 if ((size = ff_aac_parse_header(&bits, &hdr)) < 0)89 if ((size = ff_aac_parse_header(&bits, &hdr)) < 0)
92 return 0;90 return 0;
@@ -102,7 +100,7 @@ static int aac_sync(uint64_t state, AACAC3ParseContext *hdr_info, · 9 unmodified lines
102static av_cold int aac_parse_init(AVCodecParserContext *s1)100static av_cold int aac_parse_init(AVCodecParserContext *s1)
103{101{
104 AACAC3ParseContext *s = s1->priv_data;102 AACAC3ParseContext *s = s1->priv_data;
105 s->header_size = AAC_HEADER_SIZE;103 s->header_size = AAC_ADTS_HEADER_SIZE;
106 s->sync = aac_sync;104 s->sync = aac_sync;
107 return 0;105 return 0;
108}106}

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