]> git.sesse.net Git - ffmpeg/commitdiff
avformat/sccdec: only change duration for last subtitle
authorPaul B Mahol <onemda@gmail.com>
Mon, 23 Dec 2019 21:47:27 +0000 (22:47 +0100)
committerPaul B Mahol <onemda@gmail.com>
Mon, 23 Dec 2019 21:47:27 +0000 (22:47 +0100)
libavformat/sccdec.c

index 0cf09c458a2e409ca30387f6b208b630f562ec28..769adc7dd90c271fdc586fe6c2c40960b475c43a 100644 (file)
@@ -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;
     }