X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Fjacosubdec.c;h=50144f7e214be82766e18cf1ecec7361bd1a2603;hb=5d0652916f2f514f077de6592407cd2c4bf3655c;hp=520c435cc5afc8f41f4b79cea8dbddf47ab44209;hpb=1f1ec958f6c68a5ceafea206a99c895f62d0f3ec;p=ffmpeg diff --git a/libavformat/jacosubdec.c b/libavformat/jacosubdec.c index 520c435cc5a..50144f7e214 100644 --- a/libavformat/jacosubdec.c +++ b/libavformat/jacosubdec.c @@ -48,7 +48,7 @@ static int timed_line(const char *ptr) (sscanf(ptr, "@%u @%u %c", &fs, &fe, &c) == 3 && fs < fe)); } -static int jacosub_probe(AVProbeData *p) +static int jacosub_probe(const AVProbeData *p) { const char *ptr = p->buf; const char *ptr_end = p->buf + p->buf_size; @@ -127,7 +127,7 @@ shift_and_ret: ts_start = (ts_start + jacosub->shift) * 100 / jacosub->timeres; ts_end = (ts_end + jacosub->shift) * 100 / jacosub->timeres; *start = ts_start; - *duration = ts_start + ts_end; + *duration = ts_end - ts_start; return buf + len; }