From 1aa8f6ce86c37dff7de914f6a2595f7a68db39a9 Mon Sep 17 00:00:00 2001 From: Jean-Paul Saman Date: Tue, 11 Mar 2008 10:19:48 +0100 Subject: [PATCH] Cleanup of AAC profile selection. --- modules/codec/ffmpeg/encoder.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/modules/codec/ffmpeg/encoder.c b/modules/codec/ffmpeg/encoder.c index dcd0bea094..1c0adc466e 100644 --- a/modules/codec/ffmpeg/encoder.c +++ b/modules/codec/ffmpeg/encoder.c @@ -386,8 +386,10 @@ int E_(OpenEncoder)( vlc_object_t *p_this ) 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; -msg_Info( p_enc, "AAC profile %s", val.psz_string ); + } } if( val.psz_string ) free( val.psz_string ); @@ -556,8 +558,10 @@ msg_Info( p_enc, "AAC profile %s", val.psz_string ); p_context->sample_rate = p_enc->fmt_in.audio.i_rate; p_context->channels = p_enc->fmt_in.audio.i_channels; - if( p_enc->fmt_out.i_codec == VLC_FOURCC('m', 'p', '4', 'a') ) - p_context->profile = p_sys->i_aac_profile; + /* Ignore FF_PROFILE_UNKNOWN */ + if( ( p_sys->i_aac_profile >= FF_PROFILE_AAC_MAIN ) && + ( p_enc->fmt_out.i_codec == VLC_FOURCC('m','p','4','a') ) ) + p_context->profile = p_sys->i_aac_profile; } /* Misc parameters */ -- 2.39.2