summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-10-01 15:20:47 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-10-02 17:15:43 +0200
commit6795ebb2eaa2c1d8ed9e40d83ebac6d695e9cc6d (patch)
treed2f21b6214174f8dc429d89c5abc20f307b2bd40 /libavformat
parente1d2a208a9be655062b57a19337447631f55e203 (diff)
avformat/sccdec: Fix position of returned subtitle packets
Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/sccdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/sccdec.c b/libavformat/sccdec.c
index 6abe252b76..cd45bda8c9 100644
--- a/libavformat/sccdec.c
+++ b/libavformat/sccdec.c
@@ -82,6 +82,7 @@ static int scc_read_header(AVFormatContext *s)
char line[4096];
int64_t pos, ts;
+ pos = ff_text_pos(&tr);
len = ff_subtitles_read_line(&tr, line, sizeof(line));
if (len <= 13) {
if (ff_text_eof(&tr))
@@ -95,7 +96,6 @@ static int scc_read_header(AVFormatContext *s)
if (sub)
sub->duration = ts - sub->pts;
- pos = ff_text_pos(&tr);
lline = (char *)&line;
lline += 12;