[FFmpeg-cvslog] avformat/dtsdec: skip the first 4k in dts_probe()

Michael Niedermayer git at videolan.org
Sat Aug 2 17:41:14 CEST 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Aug  2 17:25:04 2014 +0200| [2b501b553f6300bfec546fe81d2bc0473e43e223] | committer: Michael Niedermayer

avformat/dtsdec: skip the first 4k in dts_probe()

DTS primarly needs to be separated from PCM, and PCM can contain cliping and
overshoots at the very start which can mimic DTS headers.

If this isnt sufficient then more of the DTS stream has to be decoded
and analyzed

Fixes ticket3784

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2b501b553f6300bfec546fe81d2bc0473e43e223
---

 libavformat/dtsdec.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/dtsdec.c b/libavformat/dtsdec.c
index 330c428..0ebf847 100644
--- a/libavformat/dtsdec.c
+++ b/libavformat/dtsdec.c
@@ -36,7 +36,7 @@ static int dts_probe(AVProbeData *p)
     int sum, max, i;
     int64_t diff = 0;
 
-    buf = p->buf;
+    buf = p->buf + FFMIN(4096, p->buf_size);
 
     for(; buf < (p->buf+p->buf_size)-2; buf+=2) {
         bufp = buf;



More information about the ffmpeg-cvslog mailing list