summaryrefslogtreecommitdiffstats
path: root/libhb
diff options
context:
space:
mode:
authorRodeo <[email protected]>2012-06-18 19:31:50 +0000
committerRodeo <[email protected]>2012-06-18 19:31:50 +0000
commitdc1e7163771135f0099aa7fa312d4c0713458d62 (patch)
treeae7cf67010007b7465d59f67d9296383b28fa815 /libhb
parent8a54e42212a0989823fdad941c0f7311f878ed7d (diff)
Fix HE-AAC in MKV.
HandBrake's output should now play correctly on Sigma-based hardware players (among others). git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4750 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb')
-rw-r--r--libhb/muxmkv.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/libhb/muxmkv.c b/libhb/muxmkv.c
index 25b111b90..1c4ae83ea 100644
--- a/libhb/muxmkv.c
+++ b/libhb/muxmkv.c
@@ -286,7 +286,22 @@ static int MKVInit( hb_mux_object_t * m )
// MKV lang codes should be ISO-639-2/B
lang = lang_for_code2( audio->config.lang.iso639_2 );
track->language = lang->iso639_2b ? lang->iso639_2b : lang->iso639_2;
- track->extra.audio.samplingFreq = (float)audio->config.out.samplerate;
+ // sample rate
+ if ((audio->config.out.codec == HB_ACODEC_CA_HAAC) ||
+ (audio->config.out.codec == HB_ACODEC_AAC_PASS &&
+ audio->priv.config.extradata.length == 5))
+ {
+ // For HE-AAC, write outputSamplingFreq too
+ // samplingFreq is half of outputSamplingFreq
+ track->extra.audio.outputSamplingFreq = (float)audio->config.out.samplerate;
+ track->extra.audio.samplingFreq = track->extra.audio.outputSamplingFreq / 2.;
+ hb_log("HE-AAC Passthru!!! !!! !!!");
+ }
+ else
+ {
+ track->extra.audio.samplingFreq = (float)audio->config.out.samplerate;
+ hb_log("AAC Passthru :(");
+ }
if( audio->config.out.codec & HB_ACODEC_PASS_FLAG )
{
track->extra.audio.channels = HB_INPUT_CH_LAYOUT_GET_DISCRETE_COUNT( audio->config.in.channel_layout );