summaryrefslogtreecommitdiffstats
path: root/libhb/decavcodec.c
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2010-04-07 15:06:03 +0000
committerjstebbins <[email protected]>2010-04-07 15:06:03 +0000
commita34d4ad61e0126bb7506b328445aba1aba0c9c5d (patch)
tree41e6a057c4fbd5d5ebd4b52f95b8da3f68f91b93 /libhb/decavcodec.c
parentd814c38776e14074684958912a756179bb413eeb (diff)
fix audio clipping when downmixing and output codec is lame
The lame codec has a more limited input range than the other codecs. So tell the downmixers to stay strictly within the level range requested. also changes some tabs into spaces in deca52 and decdca git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3205 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/decavcodec.c')
-rw-r--r--libhb/decavcodec.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libhb/decavcodec.c b/libhb/decavcodec.c
index 17d320657..0f367da90 100644
--- a/libhb/decavcodec.c
+++ b/libhb/decavcodec.c
@@ -210,6 +210,8 @@ static int decavcodecInit( hb_work_object_t * w, hb_job_t * job )
pv->downmix = hb_downmix_init(w->audio->config.in.channel_layout,
w->audio->config.out.mixdown);
hb_downmix_set_chan_map( pv->downmix, &hb_smpte_chan_map, &hb_qt_chan_map );
+ if ( w->audio->config.out.codec == HB_ACODEC_LAME )
+ hb_downmix_adjust_level( pv->downmix );
}
return 0;
@@ -1083,6 +1085,8 @@ static int decavcodecviInit( hb_work_object_t * w, hb_job_t * job )
pv->downmix = hb_downmix_init(w->audio->config.in.channel_layout,
w->audio->config.out.mixdown);
hb_downmix_set_chan_map( pv->downmix, &hb_smpte_chan_map, &hb_qt_chan_map );
+ if ( w->audio->config.out.codec == HB_ACODEC_LAME )
+ hb_downmix_adjust_level( pv->downmix );
}
return 0;