mirror of
https://github.com/librempeg/librempeg
synced 2024-11-22 18:49:58 +00:00
avfilter/f_reverse: fix array overread
This commit is contained in:
parent
bdfe9e0cef
commit
6918e99907
@ -266,7 +266,9 @@ static int areverse_request_frame(AVFilterLink *outlink)
|
||||
AVFrame *out = s->frames[s->nb_frames - 1];
|
||||
out->duration = s->duration[s->flush_idx];
|
||||
out->pts = s->pts[s->flush_idx++] - s->nb_samples;
|
||||
s->nb_samples += s->pts[s->flush_idx] - s->pts[s->flush_idx - 1] - out->nb_samples;
|
||||
if (s->nb_frames > 1)
|
||||
s->nb_samples += s->pts[s->flush_idx];
|
||||
s->nb_samples -= s->pts[s->flush_idx - 1] + out->nb_samples;
|
||||
|
||||
if (av_sample_fmt_is_planar(out->format))
|
||||
reverse_samples_planar(out);
|
||||
|
Loading…
Reference in New Issue
Block a user