Skip to content
Snippets Groups Projects
Unverified Commit 14fd2d52 authored by Sébastien Blin's avatar Sébastien Blin
Browse files

video_scaler: remove assert and use a check instead

Change-Id: I47144b3f0eb00e84a058428c2fc2c2ea7a33d95f
parent 3e87dad8
Branches
Tags
No related merge requests found
......@@ -107,8 +107,11 @@ VideoScaler::scale_and_pad(const VideoFrame& input, VideoFrame& output,
}
// buffer overflow checks
assert(xoff + dest_width <= (unsigned)output_frame->width);
assert(yoff + dest_height <= (unsigned)output_frame->height);
if ((xoff + dest_width > (unsigned)output_frame->width)
|| (yoff + dest_height > (unsigned)output_frame->height)) {
JAMI_ERR("Unable to scale video");
return;
}
ctx_ = sws_getCachedContext(ctx_,
input_frame->width,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment