nu774 / fdkaac

command line encoder frontend for libfdk-aac
Other
261 stars 59 forks source link

Building broken with latest libfdk-aac #23

Closed wiiaboo closed 8 years ago

wiiaboo commented 8 years ago
../src/aacenc.c: In function 'aacenc_is_sbr_active':
../src/aacenc.c:37:37: error: 'AOT_MP2_SBR' undeclared (first use in this function)
     case AOT_SBR: case AOT_PS: case AOT_MP2_SBR: case AOT_MP2_PS:
                                     ^~~~~~~~~~~
../src/aacenc.c:37:37: note: each undeclared identifier is reported only once for each function it appears in
../src/aacenc.c:37:55: error: 'AOT_MP2_PS' undeclared (first use in this function)
     case AOT_SBR: case AOT_PS: case AOT_MP2_SBR: case AOT_MP2_PS:
                                                       ^~~~~~~~~~
../src/aacenc.c:38:10: error: 'AOT_DABPLUS_SBR' undeclared (first use in this function)
     case AOT_DABPLUS_SBR: case AOT_DABPLUS_PS:
          ^~~~~~~~~~~~~~~
../src/aacenc.c:38:32: error: 'AOT_DABPLUS_PS' undeclared (first use in this function)
     case AOT_DABPLUS_SBR: case AOT_DABPLUS_PS:
                                ^~~~~~~~~~~~~~
../src/aacenc.c: In function 'aacenc_is_dual_rate_sbr':
../src/aacenc.c:49:57: error: 'AOT_MP2_PS' undeclared (first use in this function)
     if (params->profile == AOT_PS || params->profile == AOT_MP2_PS)
                                                         ^~~~~~~~~~
../src/aacenc.c:51:63: error: 'AOT_MP2_SBR' undeclared (first use in this function)
     else if (params->profile == AOT_SBR || params->profile == AOT_MP2_SBR)
                                                               ^~~~~~~~~~~

These macros seem to be gone from FDK_audio.h in 0.1.5.

Just removing them allows compilation to finish.

diff --git a/src/aacenc.c b/src/aacenc.c
index 8df8afd..0dd47bb 100644
--- a/src/aacenc.c
+++ b/src/aacenc.c
@@ -34,8 +34,7 @@ int aacenc_is_sbr_ratio_available()
 int aacenc_is_sbr_active(const aacenc_param_t *params)
 {
     switch (params->profile) {
-    case AOT_SBR: case AOT_PS: case AOT_MP2_SBR: case AOT_MP2_PS:
-    case AOT_DABPLUS_SBR: case AOT_DABPLUS_PS:
+    case AOT_SBR: case AOT_PS:
     case AOT_DRM_SBR: case AOT_DRM_MPEG_PS:
         return 1;
     }
@@ -46,9 +45,9 @@ int aacenc_is_sbr_active(const aacenc_param_t *params)

 int aacenc_is_dual_rate_sbr(const aacenc_param_t *params)
 {
-    if (params->profile == AOT_PS || params->profile == AOT_MP2_PS)
+    if (params->profile == AOT_PS)
         return 1;
-    else if (params->profile == AOT_SBR || params->profile == AOT_MP2_SBR)
+    else if (params->profile == AOT_SBR)
         return params->sbr_ratio == 0 || params->sbr_ratio == 2;
     else if (params->profile == AOT_ER_AAC_ELD && params->lowdelay_sbr)
         return params->sbr_ratio == 2;
nu774 commented 8 years ago

Thanks, fixed on https://github.com/nu774/fdkaac/commit/c8cc3fb57ed0eff3f16a5295d2d91dfcbf2371fd