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

Han Han hanhanzhiyeqianke at gmail.com
Wed Jan 16 13:31:59 CET 2019


v2:
https://mailman.videolan.org/pipermail/vlc-devel/2019-January/122284.html

fdkaac encoder v4 has changed encoderDelay to nDelay of AACENC_InfoStruct.
Use encoderDelay before v4 and nDelay after v4

Reference: https://github.com/mstorsjo/fdk-aac/issues/93

Signed-off-by: Han Han <hanhanzhiyeqianke at gmail.com>
---
 modules/codec/fdkaac.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/modules/codec/fdkaac.c b/modules/codec/fdkaac.c
index e0b3088c4a..6a96fd192a 100644
--- a/modules/codec/fdkaac.c
+++ b/modules/codec/fdkaac.c
@@ -288,7 +288,12 @@ 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 v4 */
+#if (defined(AACENCODER_LIB_VL0) && ((AACENCODER_LIB_VL0 >= 4)))
+    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) {
-- 
2.19.2



More information about the vlc-devel mailing list