ALT Linux Bugzilla
– Attachment 1969 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 04] dtsdec: fix attempts to decode incomplete frames
0004-dtsdec-fix-attempts-to-decode-incomplete-frames.patch (text/plain), 1.50 KB, created by
Sergey Vlasov
on 2007-05-17 13:56:01 MSD
(
hide
)
Description:
[PATCH 04] dtsdec: fix attempts to decode incomplete frames
Filename:
MIME Type:
Creator:
Sergey Vlasov
Created:
2007-05-17 13:56:01 MSD
Size:
1.50 KB
patch
obsolete
>From 50939b9fd93319abb3da2a81d93e390173dde59c Mon Sep 17 00:00:00 2001 >From: Sergey Vlasov <vsu@altlinux.ru> >Date: Thu, 17 May 2007 09:26:35 +0400 >Subject: dtsdec: fix attempts to decode incomplete frames > >When (!len) is checked in the buffer fill loop in dts_decode_frame(), >the buffer does not contain a complete frame, therefore executing >"break" when there is no more input data is not correct (subsequent >code will try to decode the buffer, which then will lead to garbage >output and sync loss). The proper action is to return the number of >consumed bytes and wait for more data. > >The problematic case can be triggered by mplayer - apparently it >passes the stream to decoder without caring about frame boundaries, >and sometimes the data block happens to contain just the frame header; >in this case the first pass through the loop will consume HEADER_SIZE >bytes from the input data, and the second pass would trigger the bug. > >Signed-off-by: Sergey Vlasov <vsu@altlinux.ru> >--- > libavcodec/dtsdec.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > >diff --git a/libavcodec/dtsdec.c b/libavcodec/dtsdec.c >index 275dccb..afe266a 100644 >--- a/libavcodec/dtsdec.c >+++ b/libavcodec/dtsdec.c >@@ -191,7 +191,7 @@ dts_decode_frame(AVCodecContext * avctx, void *data, int *data_size, > > len = end - start; > if(!len) >- break; >+ return start - buff; > if(len > s->bufpos - s->bufptr) > len = s->bufpos - s->bufptr; > memcpy(s->bufptr, start, len); >-- >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