shithub: aacenc

Download patch

ref: b239498b287c17fb91352fc68735d7508e217ab5
parent: ccd27c8a0653d51a92f04f9de8dee30b9834ef9b
author: knik <knik>
date: Thu Feb 23 08:11:28 EST 2012

fixed too much exposed API

--- a/include/faac.h
+++ b/include/faac.h
@@ -16,7 +16,7 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
- * $Id: faac.h,v 1.36 2009/01/25 18:50:32 menno Exp $
+ * $Id: faac.h,v 1.37 2012/02/23 13:11:27 knik Exp $
  */
 
 #ifndef _FAAC_H_
@@ -26,14 +26,13 @@
 extern "C" {
 #endif /* __cplusplus */
 
-#if defined(_WIN32) && !defined(__MINGW32__)
-# ifndef FAACAPI
+#ifndef FAACAPI
+# if defined(_WIN32)
 #  define FAACAPI __stdcall
 # endif
-#else
-# ifndef FAACAPI
+#endif
+#ifndef FAACAPI
 #  define FAACAPI
-# endif
 #endif
 
 #pragma pack(push, 1)
--- a/libfaac/Makefile.am
+++ b/libfaac/Makefile.am
@@ -7,6 +7,7 @@
 libfaac_la_SOURCES = $(main_SOURCES) $(drm_SOURCES)
 libfaac_la_INCLUDES = aacquant.h channels.h filtbank.h hufftab.h psych.h backpred.h coder.h frame.h midside.h tns.h bitstream.h fft.h huffman.h ltp.h util.h
 libfaac_la_LIBADD = -lm
+libfaac_la_CFLAGS = -fvisibility=hidden
 
 INCLUDES = -I$(top_srcdir)/include
 
--- a/libfaac/frame.h
+++ b/libfaac/frame.h
@@ -16,7 +16,7 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
- * $Id: frame.h,v 1.30 2009/01/25 18:50:32 menno Exp $
+ * $Id: frame.h,v 1.31 2012/02/23 13:11:28 knik Exp $
  */
 
 #ifndef FRAME_H
@@ -50,14 +50,15 @@
 #include "aacquant.h"
 #include "fft.h"
 
-#if defined(_WIN32) && !defined(__MINGW32__)
-  #ifndef FAACAPI
-    #define FAACAPI __stdcall
-  #endif
-#else
-  #ifndef FAACAPI
-    #define FAACAPI
-  #endif
+#if !defined(FAACAPI) && defined(__GNUC__) && (__GNUC__ >= 4)
+# if defined(_WIN32)
+#  define FAACAPI __stdcall __declspec(dllexport)
+# else
+#  define FAACAPI __attribute__((visibility("default")))
+# endif
+#endif
+#ifndef FAACAPI
+# define FAACAPI
 #endif
 
 #pragma pack(push, 1)