Skip to content
Snippets Groups Projects
Commit be51e589 authored by Justin Ruggles's avatar Justin Ruggles
Browse files

af_asyncts: avoid overflow in out_size with large delta values

parent 70d71b58
No related branches found
No related tags found
No related merge requests found
...@@ -186,7 +186,7 @@ static int filter_samples(AVFilterLink *inlink, AVFilterBufferRef *buf) ...@@ -186,7 +186,7 @@ static int filter_samples(AVFilterLink *inlink, AVFilterBufferRef *buf)
if (labs(delta) > s->min_delta) { if (labs(delta) > s->min_delta) {
av_log(ctx, AV_LOG_VERBOSE, "Discontinuity - %"PRId64" samples.\n", delta); av_log(ctx, AV_LOG_VERBOSE, "Discontinuity - %"PRId64" samples.\n", delta);
out_size += delta; out_size = av_clipl_int32((int64_t)out_size + delta);
} else { } else {
if (s->resample) { if (s->resample) {
int comp = av_clip(delta, -s->max_comp, s->max_comp); int comp = av_clip(delta, -s->max_comp, s->max_comp);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment