Originally committed as revision 18814 to svn://svn.ffmpeg.org/ffmpeg/trunk
Unified · Split
| @@ -26,8 +26,6 @@ · 25 unmodified lines | ||
| 26 | 26 | #include "get_bits.h" |
| 27 | 27 | #include "mpeg4audio.h" |
| 28 | 28 | |
| 29 | −#define AAC_HEADER_SIZE 7 | |
| 30 | − | |
| 31 | 29 | int ff_aac_parse_header(GetBitContext *gbc, AACADTSHeaderInfo *hdr) |
| 32 | 30 | { |
| 33 | 31 | int size, rdb, ch, sr; |
| @@ -56,7 +54,7 @@ int ff_aac_parse_header(GetBitContext *gbc, AACADTSHeaderInfo *hdr) · 22 unmodified lines | ||
| 56 | 54 | skip_bits1(gbc); /* copyright_identification_bit */ |
| 57 | 55 | skip_bits1(gbc); /* copyright_identification_start */ |
| 58 | 56 | size = get_bits(gbc, 13); /* aac_frame_length */ |
| 59 | − if(size < AAC_HEADER_SIZE) | |
| 57 | + if(size < AAC_ADTS_HEADER_SIZE) | |
| 60 | 58 | return AAC_AC3_PARSE_ERROR_FRAME_SIZE; |
| 61 | 59 | |
| 62 | 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 | 84 | } tmp; |
| 87 | 85 | |
| 88 | 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 | 89 | if ((size = ff_aac_parse_header(&bits, &hdr)) < 0) |
| 92 | 90 | return 0; |
| @@ -102,7 +100,7 @@ static int aac_sync(uint64_t state, AACAC3ParseContext *hdr_info, · 9 unmodified lines | ||
| 102 | 100 | static av_cold int aac_parse_init(AVCodecParserContext *s1) |
| 103 | 101 | { |
| 104 | 102 | AACAC3ParseContext *s = s1->priv_data; |
| 105 | − s->header_size = AAC_HEADER_SIZE; | |
| 103 | + s->header_size = AAC_ADTS_HEADER_SIZE; | |
| 106 | 104 | s->sync = aac_sync; |
| 107 | 105 | return 0; |
| 108 | 106 | } |
| @@ -27,6 +27,8 @@ · 26 unmodified lines | ||
| 27 | 27 | #include "aac_ac3_parser.h" |
| 28 | 28 | #include "get_bits.h" |
| 29 | 29 | |
| 30 | +#define AAC_ADTS_HEADER_SIZE 7 | |
| 31 | + | |
| 30 | 32 | typedef struct { |
| 31 | 33 | uint32_t sample_rate; |
| 32 | 34 | uint32_t samples; |