ALT Linux Bugzilla
– Attachment 1963 Details for
Bug 11760
DTS (DCA) decoding is broken
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
[PATCH 03] dtsdec: downmix to mono or stereo if requested
0003-dtsdec-downmix-to-mono-or-stereo-if-requested.patch (text/plain), 1.24 KB, created by
Sergey Vlasov
on 2007-05-15 14:57:56 MSD
(
hide
)
Description:
[PATCH 03] dtsdec: downmix to mono or stereo if requested
Filename:
MIME Type:
Creator:
Sergey Vlasov
Created:
2007-05-15 14:57:56 MSD
Size:
1.24 KB
patch
obsolete
>From eff8b4beda14d97d253dcea1cbd962b356c5e01a Mon Sep 17 00:00:00 2001 >From: Sergey Vlasov <vsu@altlinux.ru> >Date: Tue, 15 May 2007 14:50:42 +0400 >Subject: dtsdec: downmix to mono or stereo if requested > >If avctx->channels is set to 1 or 2, ask libdts to downmix sound to >the requested number of channels instead of returning all channels. >This matches the AC3 decoder behavior and assumptions made by ffplay >and ffmpeg programs. > >Signed-off-by: Sergey Vlasov <vsu@altlinux.ru> >--- > libavcodec/dtsdec.c | 10 +++++++++- > 1 files changed, 9 insertions(+), 1 deletions(-) > >diff --git a/libavcodec/dtsdec.c b/libavcodec/dtsdec.c >index 17ba86f..ac2e9a1 100644 >--- a/libavcodec/dtsdec.c >+++ b/libavcodec/dtsdec.c >@@ -216,7 +216,15 @@ dts_decode_frame(AVCodecContext * avctx, void *data, int *data_size, > level = CONVERT_LEVEL; > bias = CONVERT_BIAS; > >- flags = s->flags | DTS_ADJUST_LEVEL; >+ if(avctx->channels == 1) { >+ flags = DTS_MONO; >+ } else if(avctx->channels == 2) { >+ flags = DTS_STEREO; >+ } else { >+ flags = s->flags; >+ } >+ >+ flags |= DTS_ADJUST_LEVEL; > if(dts_frame(s->state, s->buf, &flags, &level, bias)) { > av_log(avctx, AV_LOG_ERROR, "dts_frame() failed\n"); > goto end; >-- >1.5.1.1.197.g66b3 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 11760
:
1961
|
1962
| 1963 |
1964
|
1969
|
1990