Commit 22d99589 authored by Ting Fu's avatar Ting Fu Committed by Guo Yejun

lavfi/vf_drawbox.c: fix CID 1485004

CID 1485004: Uninitialized variables (UNINIT)
Using uninitialized value "x" when calling "*pixel_belongs_to_region".
Signed-off-by: 's avatarTing Fu <ting.fu@intel.com>
parent 58614f7b
......@@ -126,8 +126,9 @@ static void draw_region(AVFrame *frame, DrawBoxContext *ctx, int left, int top,
for (y = top; y < down; y++) {
ASSIGN_THREE_CHANNELS
if (ctx->invert_color) {
if (pixel_belongs_to_region(ctx, x, y))
row[0][x] = 0xff - row[0][x];
for (x = left; x < right; x++)
if (pixel_belongs_to_region(ctx, x, y))
row[0][x] = 0xff - row[0][x];
} else {
for (x = left; x < right; x++) {
double alpha = (double)ctx->yuv_color[A] / 255;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment