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

git version control git at videolan.org
Wed Dec 17 21:10:30 CET 2008


vlc | branch: 0.9-bugfix | Ilkka Ollakka <ileoo at videolan.org> | Tue Oct 28 14:45:11 2008 +0200| [fe3896a96a539e514bcae12adf5a8b5231c876aa] | committer: Ilkka Ollakka 

remove unneeded if for aac-profile
default aac-profile to low instead of main
(cherry picked from commit 397a4949116cf332dca73f904740c2768efff015)

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

 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 32ac223..1c2b0b8 100644
--- a/modules/codec/avcodec/avcodec.c
+++ b/modules/codec/avcodec/avcodec.c
@@ -188,7 +188,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 bd81231..a00ad2b 100644
--- a/modules/codec/avcodec/encoder.c
+++ b/modules/codec/avcodec/encoder.c
@@ -392,6 +392,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 )
     {
@@ -596,8 +598,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