summaryrefslogtreecommitdiffstats
path: root/contrib/ffmpeg/A03-truehd-downmix.patch
diff options
context:
space:
mode:
authorRodeo <[email protected]>2014-01-07 11:42:39 +0000
committerRodeo <[email protected]>2014-01-07 11:42:39 +0000
commit7f46a78ce98fe1e1bf69cc431c3303eedc1f7f66 (patch)
tree5f2912aa05d9600d3655b9ed83a695e43725f659 /contrib/ffmpeg/A03-truehd-downmix.patch
parent5bf5ef4f102648396941e4a1d1ce4af36638d16b (diff)
Revert previous borked commit. Sorry!
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5958 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'contrib/ffmpeg/A03-truehd-downmix.patch')
-rw-r--r--contrib/ffmpeg/A03-truehd-downmix.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/contrib/ffmpeg/A03-truehd-downmix.patch b/contrib/ffmpeg/A03-truehd-downmix.patch
index e69de29bb..9a9c18e13 100644
--- a/contrib/ffmpeg/A03-truehd-downmix.patch
+++ b/contrib/ffmpeg/A03-truehd-downmix.patch
@@ -0,0 +1,33 @@
+diff --git a/libavcodec/mlpdec.c b/libavcodec/mlpdec.c
+index 0eaf2e3..ef1812d 100644
+--- a/libavcodec/mlpdec.c
++++ b/libavcodec/mlpdec.c
+@@ -445,14 +445,24 @@ static int read_restart_header(MLPDecodeContext *m, GetBitContext *gbp,
+ return AVERROR_INVALIDDATA;
+ }
+
+- if (m->avctx->request_channels > 0
+- && s->max_channel + 1 >= m->avctx->request_channels
+- && substr < m->max_decoded_substream) {
++#if FF_API_REQUEST_CHANNELS
++ if (m->avctx->request_channels > 0 &&
++ m->avctx->request_channels <= s->max_channel + 1 &&
++ m->max_decoded_substream > substr) {
+ av_log(m->avctx, AV_LOG_DEBUG,
+- "Extracting %d channel downmix from substream %d. "
++ "Extracting %d-channel downmix from substream %d. "
+ "Further substreams will be skipped.\n",
+ s->max_channel + 1, substr);
+ m->max_decoded_substream = substr;
++ } else
++#endif
++ if (m->avctx->request_channel_layout == s->ch_layout &&
++ m->max_decoded_substream > substr) {
++ av_log(m->avctx, AV_LOG_DEBUG,
++ "Extracting %d-channel downmix (0x%"PRIx64") from substream %d. "
++ "Further substreams will be skipped.\n",
++ s->max_channel + 1, s->ch_layout, substr);
++ m->max_decoded_substream = substr;
+ }
+
+ s->noise_shift = get_bits(gbp, 4);