[FFmpeg-devel] [PATCH]HE-AACv1 try 3 (all missing functionality added)
Yuriy Kaminskiy
yumkam
Sat Feb 13 04:45:03 CET 2010
On 12.02.2010 23:15, Alex Converse wrote:
> Notes:
> ------------------------------------------------------------------------
> diff --git a/libavcodec/aac.c b/libavcodec/aac.c
> index 90581fc..460328f 100644
> --- a/libavcodec/aac.c
> +++ b/libavcodec/aac.c
> @@ -1625,7 +1615,8 @@ static int decode_dynamic_range(DynamicRangeControl *che_drc,
> *
> * @return Returns number of bytes consumed
> */
> -static int decode_extension_payload(AACContext *ac, GetBitContext *gb, int cnt)
> +static int decode_extension_payload(AACContext *ac, GetBitContext *gb, int cnt,
> + int id, int tag)
> {
> int crc_flag = 0;
> int res = cnt;
> @@ -1633,7 +1624,18 @@ static int decode_extension_payload(AACContext *ac, GetBitContext *gb, int cnt)
> case EXT_SBR_DATA_CRC:
> crc_flag++;
> case EXT_SBR_DATA:
> - res = decode_sbr_extension(ac, gb, crc_flag, cnt);
> + if (!ac->m4ac.sbr) {
> + av_log(ac->avccontext, AV_LOG_ERROR, "SBR signaled to be not-present but was found in the bitstream.\n");
> + skip_bits_long(gb, 8 * cnt - 4);
> + return res;
> + } else if (ac->m4ac.sbr == -1 && ac->output_configured == OC_LOCKED) {
> + av_log(ac->avccontext, AV_LOG_ERROR, "Implicit SBR was found with a first occurrence after the first frame.\n");
> + skip_bits_long(gb, 8 * cnt - 4);
> + return res;
> + } else {
> + ac->m4ac.sbr = 1;
> + }
> + res = ff_decode_sbr_extension(ac, &ac->che[id][tag]->sbr, gb, crc_flag, cnt, id);
does not this need get_che() too? I've cheched on one file (that failed on
soc-svn before) - yep, same problem (sigsegv). Added attached patch (+ patch
from issue1773, too lazy to check without) - seems work now. If you want - I'll
upload audio-track.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sbr-get-che.patch
Type: text/x-diff
Size: 969 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100213/989bc4b4/attachment.patch>
More information about the ffmpeg-devel
mailing list