[FFmpeg-cvslog] avformat/sccdec: attempt to fix valgrind issue

Paul B Mahol git at videolan.org
Sat Jan 28 18:25:30 EET 2017


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sat Jan 28 17:23:31 2017 +0100| [4cfa1f80a97641d9d4673e43c5ba4319d8290b06] | committer: Paul B Mahol

avformat/sccdec: attempt to fix valgrind issue

Signed-off-by: Paul B Mahol <onemda at gmail.com>

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

 libavformat/sccdec.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/libavformat/sccdec.c b/libavformat/sccdec.c
index a4ce557..ddf5fdf 100644
--- a/libavformat/sccdec.c
+++ b/libavformat/sccdec.c
@@ -31,7 +31,7 @@ typedef struct SCCContext {
 
 static int scc_probe(AVProbeData *p)
 {
-    char buf[128];
+    char buf[18];
     FFTextReader tr;
 
     ff_text_init_buf(&tr, p->buf, p->buf_size);
@@ -39,8 +39,7 @@ static int scc_probe(AVProbeData *p)
     while (ff_text_peek_r8(&tr) == '\r' || ff_text_peek_r8(&tr) == '\n')
         ff_text_r8(&tr);
 
-    if (ff_subtitles_read_line(&tr, buf, sizeof(buf)) < 0)
-        return 0;
+    ff_text_read(&tr, buf, sizeof(buf));
 
     if (!memcmp(buf, "Scenarist_SCC V1.0", 18))
         return AVPROBE_SCORE_MAX;



More information about the ffmpeg-cvslog mailing list