return pos;
}
-static int lrc_probe(AVProbeData *p)
+static int lrc_probe(const AVProbeData *p)
{
int64_t offset = 0;
int64_t mm;
sscanf(comma_offset + 1, "%"SCNd64, &lrc->ts_offset) != 1) {
av_dict_set(&s->metadata, line.str + 1, comma_offset + 1, 0);
}
+ lrc->ts_offset = av_clip64(lrc->ts_offset, INT64_MIN/4, INT64_MAX/4);
+
*comma_offset = ':';
*right_bracket_offset = ']';
}
while((ts_stroffset_incr = read_ts(line.str + ts_stroffset,
&ts_start)) != 0) {
+ ts_start = av_clip64(ts_start, INT64_MIN/4, INT64_MAX/4);
ts_stroffset += ts_stroffset_incr;
sub = ff_subtitles_queue_insert(&lrc->q, line.str + ts_strlength,
line.len - ts_strlength, 0);
if(!sub) {
+ ff_subtitles_queue_clean(&lrc->q);
return AVERROR(ENOMEM);
}
sub->pos = pos;