Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2019-06-27 21:20:16 +0300
committerPaul B Mahol <onemda@gmail.com>2019-06-27 21:20:16 +0300
commit2b15d436db3ff13c9f87b1396cbe6dad54a50860 (patch)
tree161bd8aaba2dbebe81f223c23aec7ff1eb4d6fa6 /libavformat/sccdec.c
parent025fcee6fa208dd484a419ecf29c3e70038a5e34 (diff)
avformat/sccdec: display last caption even when there is no empty last line
Diffstat (limited to 'libavformat/sccdec.c')
-rw-r--r--libavformat/sccdec.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavformat/sccdec.c b/libavformat/sccdec.c
index 006300fbcc..412d8aaf49 100644
--- a/libavformat/sccdec.c
+++ b/libavformat/sccdec.c
@@ -110,6 +110,7 @@ static int scc_read_header(AVFormatContext *s)
ts_end = (hh2 * 3600LL + mm2 * 60LL + ss2) * 1000LL + fs2 * 33;
count++;
+try_again:
lline = (char *)&line;
lline += 12;
@@ -138,9 +139,13 @@ static int scc_read_header(AVFormatContext *s)
sub->pts = ts_start;
sub->duration = FFMAX(1200, ts_end - ts_start);
memmove(line, line2, sizeof(line));
+ line2[0] = 0;
FFSWAP(ptrdiff_t, len, len2);
}
+ if (line[0])
+ goto try_again;
+
ff_subtitles_queue_finalize(s, &scc->q);
return ret;