summaryrefslogtreecommitdiffstats
path: root/libhb/encavcodecaudio.c
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2011-08-12 22:00:51 +0000
committerjstebbins <[email protected]>2011-08-12 22:00:51 +0000
commit5fe02b451576dbf5c914126aae1b982f6d07c4f8 (patch)
tree36e6233f5d63e0f43f9c9ef9bfdf16780e8b1af2 /libhb/encavcodecaudio.c
parentc7dc5e69f2244206a41dea18a2f4c502c25bafb4 (diff)
libhb: fix setting Libav codec private options
and logging of Libav advanced options. Thanks to Rodeo for spotting git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4170 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/encavcodecaudio.c')
-rw-r--r--libhb/encavcodecaudio.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/libhb/encavcodecaudio.c b/libhb/encavcodecaudio.c
index ebf2fd8f2..92d2e36d6 100644
--- a/libhb/encavcodecaudio.c
+++ b/libhb/encavcodecaudio.c
@@ -58,12 +58,17 @@ static int encavcodecaInit( hb_work_object_t * w, hb_job_t * job )
}
context = avcodec_alloc_context3(codec);
- int ret = av_set_string3( context, "stereo_mode", "ms_off", 1, NULL );
- /* Let avutil sanity check the options for us*/
- if( ret == AVERROR(ENOENT) )
- hb_log( "avcodec options: Unknown option %s", "stereo_mode" );
- if( ret == AVERROR(EINVAL) )
- hb_log( "avcodec options: Bad argument %s=%s", "stereo_mode", "ms_off" ? "ms_off" : "(null)" );
+ if ( w->codec_param == CODEC_ID_AAC )
+ {
+ int ret = hb_av_set_string( context, codec, "stereo_mode", "ms_off" );
+ /* Let avutil sanity check the options for us*/
+ if( ret == AVERROR_OPTION_NOT_FOUND )
+ hb_log( "avcodec options: Unknown option %s", "stereo_mode" );
+
+ if( ret == AVERROR(EINVAL) )
+ hb_log( "avcodec options: Bad argument %s=%s",
+ "stereo_mode", "ms_off" ? "ms_off" : "(null)" );
+ }
context->channel_layout = AV_CH_LAYOUT_STEREO;
switch( audio->config.out.mixdown )