From a13af9aee14f271298784d222d3dad38e7ccf43b Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Mon, 23 Dec 2019 22:47:27 +0100 Subject: [PATCH] avformat/sccdec: only change duration for last subtitle --- 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; }