[FFmpeg-cvslog] avformat/sccdec: only change duration for last subtitle

Paul B Mahol git at videolan.org
Tue Dec 24 00:13:54 EET 2019


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Mon Dec 23 22:47:27 2019 +0100| [a13af9aee14f271298784d222d3dad38e7ccf43b] | committer: Paul B Mahol

avformat/sccdec: only change duration for last subtitle

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

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

diff --git a/libavformat/sccdec.c b/libavformat/sccdec.c
index 0cf09c458a..769adc7dd9 100644
--- a/libavformat/sccdec.c
+++ b/libavformat/sccdec.c
@@ -139,7 +139,7 @@ try_again:
 
         sub->pos = current_pos;
         sub->pts = ts_start;
-        sub->duration = FFMAX(1200, ts_end - ts_start);
+        sub->duration = ts_end - ts_start;
         memmove(line, line2, sizeof(line));
         current_pos = next_pos;
         line2[0] = 0;
@@ -147,6 +147,7 @@ try_again:
 
     if (line[0]) {
         ts_start = ts_end;
+        ts_end += 1200;
         goto try_again;
     }
 



More information about the ffmpeg-cvslog mailing list