On Mon, Sep 16, 2013 at 10:43 PM, Hendrik Leppkes <[email protected]> wrote: > > On Tue, Sep 17, 2013 at 1:02 AM, Alex Converse <[email protected]>wrote: > > > This does not add support for any error resiliance tools. > > --- > > Changelog | 1 + > > libavcodec/aacdec.c | 116 > > +++++++++++++++++++++++++++++++++++++++++++++++----- > > 2 files changed, 107 insertions(+), 10 deletions(-) > > > > diff --git a/Changelog b/Changelog > > index 7e210a7..5261c18 100644 > > --- a/Changelog > > +++ b/Changelog > > @@ -33,6 +33,7 @@ version 10: > > - avconv -t option can now be used for inputs, to limit the duration of > > data read from an input file > > - incomplete Voxware MetaSound decoder > > +- Error Resiliant AAC syntax (ER AAC LC) decoding > > > > > > version 9: > > diff --git a/libavcodec/aacdec.c b/libavcodec/aacdec.c > > index 62246b6..4a18946 100644 > > --- a/libavcodec/aacdec.c > > +++ b/libavcodec/aacdec.c > > @@ -706,7 +706,7 @@ static int decode_ga_specific_config(AACContext *ac, > > AVCodecContext *avctx, > > MPEG4AudioConfig *m4ac, > > int channel_config) > > { > > - int extension_flag, ret; > > + int extension_flag, ret, ep_config, res_flags; > > uint8_t layout_map[MAX_ELEM_ID*4][3]; > > int tags = 0; > > > > @@ -752,14 +752,30 @@ static int decode_ga_specific_config(AACContext *ac, > > AVCodecContext *avctx, > > case AOT_ER_AAC_LTP: > > case AOT_ER_AAC_SCALABLE: > > case AOT_ER_AAC_LD: > > - skip_bits(gb, 3); /* aacSectionDataResilienceFlag > > - * aacScalefactorDataResilienceFlag > > - * aacSpectralDataResilienceFlag > > - */ > > + res_flags = get_bits(gb, 3); > > + if (res_flags) { > > + av_log(avctx, AV_LOG_ERROR, > > + "AAC data resiliance not supported (flags %x)\n", > > + res_flags); > > + return AVERROR_PATCHWELCOME; > > + } > > break; > > } > > skip_bits1(gb); // extensionFlag3 (TBD in version 3) > > > > Hm, does this happen in normal aac streams? > The code previously completely ignored the flags, so whats the worst thing > that can happen if the flags are set and you don't support it? Does it > require completely bailing out and stopping decoding? >
This change doesn't effect "normal" AAC streams. These flags are only read for AOT_ER_AAC_LC, AOT_ER_AAC_LTP, AOT_ER_AAC_SCALABLE, and AOT_ER_AAC_LD. Decoding for these ER AOTs currently fails in the caller decode_audio_specific_config(). If these flags are set then various syntax elements are coded differently from what is currently supported and the decoder will spit out an (often misleading) error nearly every frame. In the rare chance the frame decodes without error output is still wrong. --Alex _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
