ffmpeg | branch: master | Paul B Mahol <one...@gmail.com> | Sat Jun 13 12:23:29 
2020 +0200| [416dc133b953ab2dd78297f6272f1062b0586b57] | committer: Paul B Mahol

avformat/sccdec: move pos variables outside of loop

Ensures that sub->pos is always correct.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=416dc133b953ab2dd78297f6272f1062b0586b57
---

 libavformat/sccdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/sccdec.c b/libavformat/sccdec.c
index 955e39f74c..0eb1dd307e 100644
--- a/libavformat/sccdec.c
+++ b/libavformat/sccdec.c
@@ -64,6 +64,7 @@ static int scc_read_header(AVFormatContext *s)
     SCCContext *scc = s->priv_data;
     AVStream *st = avformat_new_stream(s, NULL);
     char line[4096], line2[4096];
+    int64_t current_pos, next_pos;
     int64_t ts_start, ts_end;
     int count = 0, ret = 0;
     ptrdiff_t len2, len;
@@ -79,7 +80,6 @@ static int scc_read_header(AVFormatContext *s)
     st->codecpar->codec_id   = AV_CODEC_ID_EIA_608;
 
     while (!ff_text_eof(&tr)) {
-        int64_t current_pos, next_pos;
         char *saveptr = NULL, *lline;
         int hh1, mm1, ss1, fs1, i;
         int hh2, mm2, ss2, fs2;

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to