diff mbox series

[FFmpeg-devel,08/20] avformat/sccdec: Fix position of returned subtitle packets

Message ID AM7PR03MB6660DE441FE1D100DD32DCF48FAB9@AM7PR03MB6660.eurprd03.prod.outlook.com
State Accepted
Headers show
Series [FFmpeg-devel,01/20] libpostproc/postprocess_template: Don't reimplement FFSWAP | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

Andreas Rheinhardt Oct. 1, 2021, 9:08 p.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavformat/sccdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Paul B Mahol Oct. 2, 2021, 2:58 p.m. UTC | #1
maybe ok
diff mbox series

Patch

diff --git a/libavformat/sccdec.c b/libavformat/sccdec.c
index efd6024001..0b3e1ab74c 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 = line;
         lline += 12;