diff options
author | Rodeo <[email protected]> | 2012-08-11 09:24:54 +0000 |
---|---|---|
committer | Rodeo <[email protected]> | 2012-08-11 09:24:54 +0000 |
commit | 3b80634a75354adf9e6c7ce1deb8dca8a5cad489 (patch) | |
tree | 61431bc711c997f2e0f5a64c07d6ef455038d843 /libhb/hb.c | |
parent | 332c5629f962014c8121b7a982e438386decdcbc (diff) |
Fix a bug where we were attempting to downmix Dolby Surround (AV_CH_LAYOUT_STEREO_DOWNMIX) to AV_CH_LAYOUT_STEREO via libavresample (which is not implemented).
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4898 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/hb.c')
-rw-r--r-- | libhb/hb.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libhb/hb.c b/libhb/hb.c index 4c9ca4a1c..c51683c7c 100644 --- a/libhb/hb.c +++ b/libhb/hb.c @@ -255,8 +255,7 @@ uint64_t hb_ff_mixdown_xlat(int hb_mixdown, int *downmix_mode) uint64_t hb_ff_layout_xlat(uint64_t ff_channel_layout, int nchannels) { uint64_t hb_layout = ff_channel_layout; - if (!hb_layout || - av_get_channel_layout_nb_channels(hb_layout) != nchannels) + if (!hb_layout || av_get_channel_layout_nb_channels(hb_layout) != nchannels) { hb_layout = av_get_default_channel_layout(nchannels); if (!hb_layout) @@ -267,6 +266,11 @@ uint64_t hb_ff_layout_xlat(uint64_t ff_channel_layout, int nchannels) ff_channel_layout, nchannels); } } + else if (hb_layout == AV_CH_LAYOUT_STEREO_DOWNMIX) + { + // Dolby is really only Stereo as far as downmixing is concerned + hb_layout = AV_CH_LAYOUT_STEREO; + } return hb_layout; } |