[vlc-devel] commit: Cleanup of AAC profile selection. (Jean-Paul Saman )
git version control
git at videolan.org
Tue Mar 11 10:25:04 CET 2008
vlc | branch: master | Jean-Paul Saman <jpsaman at videolan.org> | Tue Mar 11 10:19:48 2008 +0100| [1aa8f6ce86c37dff7de914f6a2595f7a68db39a9]
Cleanup of AAC profile selection.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1aa8f6ce86c37dff7de914f6a2595f7a68db39a9
---
modules/codec/ffmpeg/encoder.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/modules/codec/ffmpeg/encoder.c b/modules/codec/ffmpeg/encoder.c
index dcd0bea..1c0adc4 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 */
More information about the vlc-devel
mailing list