CID 1485004: Uninitialized variables (UNINIT) Using uninitialized value "x" when calling "*pixel_belongs_to_region".
Signed-off-by: Ting Fu <ting...@intel.com> --- libavfilter/vf_drawbox.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libavfilter/vf_drawbox.c b/libavfilter/vf_drawbox.c index fff78862e9..1e9e028650 100644 --- a/libavfilter/vf_drawbox.c +++ b/libavfilter/vf_drawbox.c @@ -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; -- 2.17.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".