return NULL;
shift_and_ret:
- ts_start64 = (ts_start + jacosub->shift) * 100LL / jacosub->timeres;
- ts_end64 = (ts_end + jacosub->shift) * 100LL / jacosub->timeres;
+ ts_start64 = (ts_start + (int64_t)jacosub->shift) * 100LL / jacosub->timeres;
+ ts_end64 = (ts_end + (int64_t)jacosub->shift) * 100LL / jacosub->timeres;
*start = ts_start64;
*duration = ts_end64 - ts_start64;
return buf + len;
sub = ff_subtitles_queue_insert(&jacosub->q, line, len, merge_line);
if (!sub) {
+ av_bprint_finalize(&header, NULL);
ret = AVERROR(ENOMEM);
goto fail;
}
/* SHIFT and TIMERES affect the whole script so packet timing can only be
* done in a second pass */
for (i = 0; i < jacosub->q.nb_subs; i++) {
- AVPacket *sub = &jacosub->q.subs[i];
+ AVPacket *sub = jacosub->q.subs[i];
read_ts(jacosub, sub->data, &sub->pts, &sub->duration);
}
ff_subtitles_queue_finalize(s, &jacosub->q);
min_ts, ts, max_ts, flags);
}
-AVInputFormat ff_jacosub_demuxer = {
+const AVInputFormat ff_jacosub_demuxer = {
.name = "jacosub",
.long_name = NULL_IF_CONFIG_SMALL("JACOsub subtitle format"),
.priv_data_size = sizeof(JACOsubContext),