summaryrefslogtreecommitdiffstats
path: root/libhb/encavcodecaudio.c
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2011-10-15 21:32:20 +0000
committerjstebbins <[email protected]>2011-10-15 21:32:20 +0000
commit0646bd60a8f672a003195e1c83ebbcb08d05aa99 (patch)
tree7a0655dddf26d2a5463f6ea59a0e6e802119e867 /libhb/encavcodecaudio.c
parente3cbf2a342b7093d0b0b1720d3b3c933c3a4fa69 (diff)
bump Libav from v0.7.1 to v0.7-1241-g5f3fb59
Fixes VC-1 decode issue Adds partial support for interlaced VC-1 decode Adds ProRes decoder Fixes ac3 encoder dolby flag Fixes DCA frame size setting (delete patch A04) Fixes VC-1 repeat field processing (delete patch A05) Numerous other bug fixes and enhancements git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4291 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/encavcodecaudio.c')
-rw-r--r--libhb/encavcodecaudio.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/libhb/encavcodecaudio.c b/libhb/encavcodecaudio.c
index cf27f0405..6645d22dc 100644
--- a/libhb/encavcodecaudio.c
+++ b/libhb/encavcodecaudio.c
@@ -58,16 +58,10 @@ static int encavcodecaInit( hb_work_object_t * w, hb_job_t * job )
}
context = avcodec_alloc_context3(codec);
+ AVDictionary *av_opts = 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)" );
+ av_dict_set( &av_opts, "stereo_mode", "ms_off", 0 );
}
context->channel_layout = AV_CH_LAYOUT_STEREO;
@@ -111,11 +105,20 @@ static int encavcodecaInit( hb_work_object_t * w, hb_job_t * job )
// Try to set format to float. Fallback to whatever is supported.
hb_ff_set_sample_fmt( context, codec );
- if( hb_avcodec_open( context, codec, 0 ) )
+ if( hb_avcodec_open( context, codec, &av_opts, 0 ) )
{
hb_log( "encavcodecaInit: avcodec_open failed" );
return 1;
}
+ // avcodec_open populates the opts dictionary with the
+ // things it didn't recognize.
+ AVDictionaryEntry *t = NULL;
+ while( ( t = av_dict_get( av_opts, "", t, AV_DICT_IGNORE_SUFFIX ) ) )
+ {
+ hb_log( "encavcodecaInit: Unknown avcodec option %s", t->key );
+ }
+ av_dict_free( &av_opts );
+
pv->context = context;
audio->config.out.samples_per_frame = pv->samples_per_frame = context->frame_size;