summaryrefslogtreecommitdiffstats
path: root/contrib
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 /contrib
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 'contrib')
-rw-r--r--contrib/libmkv/A02-audio-out-sampling-freq.patch56
1 files changed, 56 insertions, 0 deletions
diff --git a/contrib/libmkv/A02-audio-out-sampling-freq.patch b/contrib/libmkv/A02-audio-out-sampling-freq.patch
new file mode 100644
index 000000000..12c05dda7
--- /dev/null
+++ b/contrib/libmkv/A02-audio-out-sampling-freq.patch
@@ -0,0 +1,56 @@
+diff --git a/include/libmkv.h b/include/libmkv.h
+index 146a91f..f03d608 100644
+--- a/include/libmkv.h
++++ b/include/libmkv.h
+@@ -203,6 +204,7 @@ struct mk_TrackConfig_s {
+ } video;
+ struct {
+ float samplingFreq; /* Sampling Frequency in Hz */
++ float outputSamplingFreq; /* Playback Sampling Frequency in Hz (e.g. for AAC w/SBR) */
+ unsigned channels; /* Number of channels for this track */
+ unsigned bitDepth; /* Bits per sample (PCM) */
+ } audio;
+diff --git a/src/tracks.c b/src/tracks.c
+index f9c7e48..a2a60ca 100644
+--- a/src/tracks.c
++++ b/src/tracks.c
+@@ -174,6 +174,11 @@ mk_Track *mk_createTrack(mk_Writer *w, mk_TrackConfig *tc)
+ /* SamplingFrequency */
+ if (mk_writeFloat(v, MATROSKA_ID_AUDIOSAMPLINGFREQ, tc->extra.audio.samplingFreq) < 0)
+ return NULL;
++ if (tc->extra.audio.outputSamplingFreq) {
++ /* Output SamplingFrequency */
++ if (mk_writeFloat(v, MATROSKA_ID_AUDIOOUTSAMPLINGFREQ, tc->extra.audio.outputSamplingFreq) < 0)
++ return NULL;
++ }
+ /* Channels */
+ if (mk_writeUInt(v, MATROSKA_ID_AUDIOCHANNELS, tc->extra.audio.channels) < 0)
+ return NULL;
+diff --git a/include/libmkv.h b/include/libmkv.h
+index 146a91f..f03d608 100644
+--- a/include/libmkv.h
++++ b/include/libmkv.h
+@@ -203,6 +204,7 @@ struct mk_TrackConfig_s {
+ } video;
+ struct {
+ float samplingFreq; /* Sampling Frequency in Hz */
++ float outputSamplingFreq; /* Playback Sampling Frequency in Hz (e.g. for AAC w/SBR) */
+ unsigned channels; /* Number of channels for this track */
+ unsigned bitDepth; /* Bits per sample (PCM) */
+ } audio;
+diff --git a/src/tracks.c b/src/tracks.c
+index f9c7e48..a2a60ca 100644
+--- a/src/tracks.c
++++ b/src/tracks.c
+@@ -174,6 +174,11 @@ mk_Track *mk_createTrack(mk_Writer *w, mk_TrackConfig *tc)
+ /* SamplingFrequency */
+ if (mk_writeFloat(v, MATROSKA_ID_AUDIOSAMPLINGFREQ, tc->extra.audio.samplingFreq) < 0)
+ return NULL;
++ if (tc->extra.audio.outputSamplingFreq) {
++ /* Output SamplingFrequency */
++ if (mk_writeFloat(v, MATROSKA_ID_AUDIOOUTSAMPLINGFREQ, tc->extra.audio.outputSamplingFreq) < 0)
++ return NULL;
++ }
+ /* Channels */
+ if (mk_writeUInt(v, MATROSKA_ID_AUDIOCHANNELS, tc->extra.audio.channels) < 0)
+ return NULL;