Mercurial > libavcodec.hg
comparison aac.c @ 9150:4fe6dee5f1dd libavcodec
If we get an error from ff_aac_parse_header() we should not trust the header info that it provides.
author | alexc |
---|---|
date | Fri, 06 Mar 2009 22:36:24 +0000 |
parents | 955835e2bc99 |
children | 1c478e02676a |
comparison
equal
deleted
inserted
replaced
9149:955835e2bc99 | 9150:4fe6dee5f1dd |
---|---|
1596 if (hdr_info.chan_config) | 1596 if (hdr_info.chan_config) |
1597 ac->m4ac.chan_config = hdr_info.chan_config; | 1597 ac->m4ac.chan_config = hdr_info.chan_config; |
1598 ac->m4ac.sample_rate = hdr_info.sample_rate; | 1598 ac->m4ac.sample_rate = hdr_info.sample_rate; |
1599 ac->m4ac.sampling_index = hdr_info.sampling_index; | 1599 ac->m4ac.sampling_index = hdr_info.sampling_index; |
1600 ac->m4ac.object_type = hdr_info.object_type; | 1600 ac->m4ac.object_type = hdr_info.object_type; |
1601 } | |
1602 if (hdr_info.num_aac_frames == 1) { | 1601 if (hdr_info.num_aac_frames == 1) { |
1603 if (!hdr_info.crc_absent) | 1602 if (!hdr_info.crc_absent) |
1604 skip_bits(gb, 16); | 1603 skip_bits(gb, 16); |
1605 } else { | 1604 } else { |
1606 ff_log_missing_feature(ac->avccontext, "More than one AAC RDB per ADTS frame is", 0); | 1605 ff_log_missing_feature(ac->avccontext, "More than one AAC RDB per ADTS frame is", 0); |
1607 return -1; | 1606 return -1; |
1607 } | |
1608 } | 1608 } |
1609 return size; | 1609 return size; |
1610 } | 1610 } |
1611 | 1611 |
1612 static int aac_decode_frame(AVCodecContext * avccontext, void * data, int * data_size, const uint8_t * buf, int buf_size) { | 1612 static int aac_decode_frame(AVCodecContext * avccontext, void * data, int * data_size, const uint8_t * buf, int buf_size) { |