summaryrefslogtreecommitdiffstats
path: root/libhb/hb.c
diff options
context:
space:
mode:
authorRodeo <[email protected]>2012-01-31 01:34:30 +0000
committerRodeo <[email protected]>2012-01-31 01:34:30 +0000
commit446af21bdb70552095e0fd00770c1476f508fdb6 (patch)
tree78afa80d2a6af80e586674e8b71d0c79a97c5a73 /libhb/hb.c
parenta6543769881f5c16bd6cf8fc8955279410dc7419 (diff)
Update hb_ff_dts_request_5point1 to work with DTS-ES 6.0 Distcrete sources (decode the DTS 5.0 core).
Rename it to hb_ff_dts_disable_xch. Tested with: M2TS -> regular DTS 5.1 -> DTS-ES 6.1 Discrete MKV -> regular DTS 5.1 -> DTS-ES 6.0 Discrete -> DTS-ES 6.1 Discrete git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4428 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/hb.c')
-rw-r--r--libhb/hb.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/libhb/hb.c b/libhb/hb.c
index 0e3e9e572..90e6916ff 100644
--- a/libhb/hb.c
+++ b/libhb/hb.c
@@ -300,16 +300,15 @@ void hb_ff_set_sample_fmt(AVCodecContext *context, AVCodec *codec)
}
}
-// Libav can decode DTS-ES 6.1 (5.1 core + XCh extension)
-// but we don't support 6.1 (and incorrectly assume 7.0)
-// request 6 channels to disable XCh processing in Libav
-int hb_ff_dts_request_5point1( AVCodecContext *c )
+// Libav can decode DTS-ES 6.0/6.1 (5.0/5.1 core + XCh extension)
+// but we don't support 6.0/6.1 (and incorrectly assume 5.1/7.0)
+// request channels-1 to disable XCh processing in Libav
+int hb_ff_dts_disable_xch( AVCodecContext *c )
{
if( ( c->codec_id == CODEC_ID_DTS ) &&
- ( c->channels == 7 ) &&
- ( c->channel_layout & ( AV_CH_BACK_CENTER|AV_CH_LOW_FREQUENCY ) ) )
+ ( c->channel_layout & ( AV_CH_LAYOUT_5POINT0|AV_CH_BACK_CENTER ) ) )
{
- c->request_channels = c->channels = 6;
+ c->request_channels = --c->channels;
c->channel_layout &= ~AV_CH_BACK_CENTER;
return 1;
}