contribs: faad: add patched define in header
authorFrancois Cartegnie <fcvlcdev@free.fr>
Thu, 4 May 2017 11:53:19 +0000 (13:53 +0200)
committerFrancois Cartegnie <fcvlcdev@free.fr>
Thu, 4 May 2017 11:53:19 +0000 (13:53 +0200)
contrib/src/faad2/faad2-add-define.patch [new file with mode: 0644]
contrib/src/faad2/rules.mak
modules/codec/faad.c

diff --git a/contrib/src/faad2/faad2-add-define.patch b/contrib/src/faad2/faad2-add-define.patch
new file mode 100644 (file)
index 0000000..4f95182
--- /dev/null
@@ -0,0 +1,10 @@
+--- faad2/include/neaacdec.orig.h      2017-05-04 13:46:52.553943436 +0200
++++ faad2/include/neaacdec.h   2017-05-04 13:46:47.667989456 +0200
+@@ -70,6 +70,7 @@
+ #endif
+ #define FAAD2_VERSION "2.7"
++#define FAAD2_VIDEOLAN_PATCHED
+ /* object types for AAC */
+ #define MAIN       1
index 6fd7366..4a4467b 100644 (file)
@@ -23,6 +23,7 @@ endif
        $(APPLY) $(SRC)/faad2/faad2-disable-drc.patch
        $(APPLY) $(SRC)/faad2/faad2-fix-71wPCEmapping.patch
        $(APPLY) $(SRC)/faad2/faad2-fix-cpe-reconstruction.patch
+       $(APPLY) $(SRC)/faad2/faad2-add-define.patch
        cd $(UNPACK_DIR) && $(CC) -iquote . -E - </dev/null || sed -i 's/-iquote /-I/' libfaad/Makefile.am
        $(MOVE)
 
index 3dff00b..809983f 100644 (file)
@@ -440,6 +440,7 @@ static int DecodeBlock( decoder_t *p_dec, block_t *p_block )
             p_sys->b_ps = frame.ps;
         }
 
+#ifndef FAAD2_VIDEOLAN_PATCHED
         /* PS Enabled FAAD PCA bug hotfix (contribs has patch) */
         if( frame.channels == 8 )
         {
@@ -480,6 +481,7 @@ static int DecodeBlock( decoder_t *p_dec, block_t *p_block )
                 break;
             }
         }
+#endif
 
         /* Convert frame.channel_position to our own channel values */
         p_dec->fmt_out.audio.i_physical_channels = 0;