diff options
author | Rodeo <[email protected]> | 2014-02-18 02:26:52 +0000 |
---|---|---|
committer | Rodeo <[email protected]> | 2014-02-18 02:26:52 +0000 |
commit | 52036382899171921343e10053fa3adaedcb19d2 (patch) | |
tree | 9c0204eeee2959d85b55b74984936e8cf46ce82a /libhb/decavcodec.c | |
parent | 6bd1bab325550ccc8a9c9d3ee372a0aaa2e75c2e (diff) |
Bump libav to v10_beta1
Remove some patches that have been applied upstream.
Add support for AVDownmixInfo side data (i.e. mix levels).
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6039 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/decavcodec.c')
-rw-r--r-- | libhb/decavcodec.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/libhb/decavcodec.c b/libhb/decavcodec.c index 7409bc8db..c158bcf1b 100644 --- a/libhb/decavcodec.c +++ b/libhb/decavcodec.c @@ -2176,6 +2176,29 @@ static void decodeAudio(hb_audio_t *audio, hb_work_private_t *pv, uint8_t *data, } else { + AVFrameSideData *side_data; + if ((side_data = + av_frame_get_side_data(pv->frame, + AV_FRAME_DATA_DOWNMIX_INFO)) != NULL) + { + double surround_mix_level, center_mix_level; + AVDownmixInfo *downmix_info = (AVDownmixInfo*)side_data->data; + if (audio->config.out.mixdown == HB_AMIXDOWN_DOLBY || + audio->config.out.mixdown == HB_AMIXDOWN_DOLBYPLII) + { + surround_mix_level = downmix_info->surround_mix_level_ltrt; + center_mix_level = downmix_info->center_mix_level_ltrt; + } + else + { + surround_mix_level = downmix_info->surround_mix_level; + center_mix_level = downmix_info->center_mix_level; + } + hb_audio_resample_set_mix_levels(pv->resample, + surround_mix_level, + center_mix_level, + downmix_info->lfe_mix_level); + } hb_audio_resample_set_channel_layout(pv->resample, pv->frame->channel_layout); hb_audio_resample_set_sample_fmt(pv->resample, |