[vlc-devel] commit: remove unneeded if for aac-profile (Ilkka Ollakka )

git version control git at videolan.org
Tue Oct 28 14:30:45 CET 2008


vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Tue Oct 28 14:45:11 2008 +0200| [397a4949116cf332dca73f904740c2768efff015] | committer: Ilkka Ollakka 

remove unneeded if for aac-profile
default aac-profile to low instead of main

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=397a4949116cf332dca73f904740c2768efff015
---

 modules/codec/avcodec/avcodec.c |    2 +-
 modules/codec/avcodec/encoder.c |    6 ++++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/modules/codec/avcodec/avcodec.c b/modules/codec/avcodec/avcodec.c
index 59953ab..87c7daa 100644
--- a/modules/codec/avcodec/avcodec.c
+++ b/modules/codec/avcodec/avcodec.c
@@ -187,7 +187,7 @@ vlc_module_begin();
 
 #if LIBAVCODEC_VERSION_INT >= ((51<<16)+(40<<8)+4)
     /* Audio AAC encoder profile */
-    add_string( ENC_CFG_PREFIX "aac-profile", "main", NULL,
+    add_string( ENC_CFG_PREFIX "aac-profile", "low", NULL,
                 ENC_PROFILE_TEXT, ENC_PROFILE_LONGTEXT, true );
 #endif
 #endif /* ENABLE_SOUT */
diff --git a/modules/codec/avcodec/encoder.c b/modules/codec/avcodec/encoder.c
index cee97ff..19519a1 100644
--- a/modules/codec/avcodec/encoder.c
+++ b/modules/codec/avcodec/encoder.c
@@ -390,6 +390,8 @@ int OpenEncoder( vlc_object_t *p_this )
 
 #if LIBAVCODEC_VERSION_INT >= ((51<<16)+(40<<8)+4)
     var_Get( p_enc, ENC_CFG_PREFIX "aac-profile", &val );
+    /* ffmpeg uses faac encoder atm, and it has issues with
+     * other than low-complexity profile, so default to that */
     p_sys->i_aac_profile = FF_PROFILE_AAC_LOW;
     if( val.psz_string && *val.psz_string )
     {
@@ -594,8 +596,8 @@ int OpenEncoder( vlc_object_t *p_this )
              * to the desired value (-R option of the faac frontend)
             p_enc->fmt_in.audio.i_rate = p_context->sample_rate;*/
 #if LIBAVCODEC_VERSION_INT >= ((51<<16)+(40<<8)+4)
-        /* Ignore FF_PROFILE_UNKNOWN */
-        if( p_sys->i_aac_profile >= FF_PROFILE_AAC_MAIN )
+            /* vlc should default to low-complexity profile, faac encoder
+             * has bug and aac audio has issues otherwise atm */
             p_context->profile = p_sys->i_aac_profile;
 #endif
         }




More information about the vlc-devel mailing list