[vlc-devel] [PATCH] fdkaac: Fix build failure with libfdk-aac v2

H Han hanhanzhiyeqianke at gmail.com
Tue Jan 15 23:23:53 CET 2019


On Sun, 13 Jan 2019 at 09:25, Rémi Denis-Courmont <remi at remlab.net> wrote:
>
>         Hello,
>
> Le sunnuntaina 13. tammikuuta 2019, 14.48.59 EET Han Han a écrit :
> > fdkaac has changed encoderDelay to nDelay of AACENC_InfoStruct in v2.0.
> > Use encoderDelay before v2.0 and nDelay after v2.0.
> >
> > Reference: https://github.com/mstorsjo/fdk-aac/issues/93
> >
> > Signed-off-by: Han Han <hanhanzhiyeqianke at gmail.com>
> > ---
> >  modules/codec/fdkaac.c | 9 +++++++++
> >  1 file changed, 9 insertions(+)
> >
> > diff --git a/modules/codec/fdkaac.c b/modules/codec/fdkaac.c
> > index e0b3088c4a..861a734337 100644
> > --- a/modules/codec/fdkaac.c
> > +++ b/modules/codec/fdkaac.c
> > @@ -92,6 +92,11 @@ static void CloseEncoder(vlc_object_t *);
> >  #define SIGNALING_COMPATIBLE 1
> >  #define SIGNALING_HIERARCHICAL 2
> >
> > +#define FDKENC_VER_AT_LEAST(vl0, vl1) \
> > +    (defined(AACENCODER_LIB_VL0) && \
> > +        ((AACENCODER_LIB_VL0 > vl0) || \
> > +         (AACENCODER_LIB_VL0 == vl0 && AACENCODER_LIB_VL1 >= vl1)))
>
> Parameter expansion safety, pretty please.
Thanks for review. I will fix it the next version
>
> > +
> >  static const int pi_aot_values[] = { PROFILE_AAC_LC, PROFILE_AAC_HE,
> > PROFILE_AAC_HE_v2, PROFILE_AAC_LD, PROFILE_AAC_ELD }; static const char
> > *const ppsz_aot_descriptions[] =
> >  { N_("AAC-LC"), N_("HE-AAC"), N_("HE-AAC-v2"), N_("AAC-LD"), N_("AAC-ELD")
> > }; @@ -288,7 +293,11 @@ static int OpenEncoder(vlc_object_t *p_this)
> >      p_sys->i_maxoutputsize = 768*p_enc->fmt_in.audio.i_channels;
> >      p_enc->fmt_in.audio.i_bitspersample = 16;
> >      p_sys->i_frame_size = info.frameLength;
> > +#if FDKENC_VER_AT_LEAST(4, 0)
> > +    p_sys->i_encoderdelay = info.nDelay;
> > +#else
> >      p_sys->i_encoderdelay = info.encoderDelay;
> > +#endif
> >
> >      p_enc->fmt_out.i_extra = info.confSize;
> >      if (p_enc->fmt_out.i_extra) {
>
> Br,
>
> --
> レミ・デニ-クールモン
> http://www.remlab.net/
>
>
>


More information about the vlc-devel mailing list