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

H Han hanhanzhiyeqianke at gmail.com
Wed Jan 16 13:23:37 CET 2019


On Tue, 15 Jan 2019 at 15:22, Zhao Zhili <quinkblack at foxmail.com> wrote:
>
>
>
> > On Jan 16, 2019, at 6:31 AM, Han Han <hanhanzhiyeqianke at gmail.com> wrote:
> >
> > v1:
> > https://mailman.videolan.org/pipermail/vlc-devel/2019-January/122253.html
> >
> > fdkaac encoder 4.0 has changed encoderDelay to nDelay of AACENC_InfoStruct.
> > Use encoderDelay before 4.0 and nDelay after 4.0.
> >
> > Reference: https://github.com/mstorsjo/fdk-aac/issues/93
> >
> > Signed-off-by: Han Han <hanhanzhiyeqianke at gmail.com>
> > ---
> > modules/codec/fdkaac.c | 6 ++++++
> > 1 file changed, 6 insertions(+)
> >
> > diff --git a/modules/codec/fdkaac.c b/modules/codec/fdkaac.c
> > index e0b3088c4a..64fa18478e 100644
> > --- a/modules/codec/fdkaac.c
> > +++ b/modules/codec/fdkaac.c
> > @@ -288,7 +288,13 @@ 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;
> > +    /* The encode info structure uses nDelay since fdk-acc encoder 4.0 */
> > +#if (defined(AACENCODER_LIB_VL0) && ((AACENCODER_LIB_VL0 > 4) || \
> > +         (AACENCODER_LIB_VL0 == 4 && AACENCODER_LIB_VL1 >= 0)))
> > +    p_sys->i_encoderdelay = info.nDelay;
>
> Does AACENCODER_LIB_VL0 >= 4 work?
Yes. It should works because the last fdk-aac encoder is 3..4.22 when
the current one
is 4.0.0. I will simplify the if condition here.
>
> > +#else
> >     p_sys->i_encoderdelay = info.encoderDelay;
> > +#endif
> >
> >     p_enc->fmt_out.i_extra = info.confSize;
> >     if (p_enc->fmt_out.i_extra) {
> > --
> > 2.19.2
> >
> > _______________________________________________
> > vlc-devel mailing list
> > To unsubscribe or modify your subscription options:
> > https://mailman.videolan.org/listinfo/vlc-devel
>
>
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list