+#if LIBAVCODEC_VERSION_INT >= ((51<<16)+(40<<8)+4)
+ var_Get( p_enc, ENC_CFG_PREFIX "aac-profile", &val );
+ p_sys->i_aac_profile = FF_PROFILE_UNKNOWN;
+ if( val.psz_string && *val.psz_string )
+ {
+ if( !strncmp( val.psz_string, "main", 4 ) )
+ p_sys->i_aac_profile = FF_PROFILE_AAC_MAIN;
+ else if( !strncmp( val.psz_string, "low", 3 ) )
+ p_sys->i_aac_profile = FF_PROFILE_AAC_LOW;
+#if 0 /* Not supported by FAAC encoder */
+ else if( !strncmp( val.psz_string, "ssr", 3 ) )
+ p_sys->i_aac_profile = FF_PROFILE_AAC_SSR;
+#endif
+ else if( !strncmp( val.psz_string, "ltp", 3 ) )
+ p_sys->i_aac_profile = FF_PROFILE_AAC_LTP;
+ else
+ {
+ msg_Warn( p_enc, "unknown AAC profile requested" );
+ p_sys->i_aac_profile = FF_PROFILE_UNKNOWN;
+ }
+ }
+ if( val.psz_string ) free( val.psz_string );
+#endif
+