aboutsummaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorDavid Staessens <dstaessens@google.com>2021-03-16 16:00:56 +0900
committerChih-Yu Huang <akahuang@google.com>2021-05-12 11:36:36 +0900
commit7406fe60ea403eb7a3ceb3c6ab88deaa42d325de (patch)
tree48868b3949db4f98a6bd2c6e97394196677efa02 /components
parentc4a50a41eb3ae12d6af955d6760292578a154358 (diff)
downloadv4l2_codec2-7406fe60ea403eb7a3ceb3c6ab88deaa42d325de.tar.gz
v4l2_codec2: zero v4l2_rect field before performing IOCTL.
This CL performs a small bit of cleanup, clearing the v4l2_rect data before performing an IOCTL. Bug: 143333813 Test: arc.VideoEncodeAccel.h264_192p_i420_vm Change-Id: Ie24daa1d37b867a53acf0734c457ba47ad6e2d12
Diffstat (limited to 'components')
-rw-r--r--components/V4L2Encoder.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/components/V4L2Encoder.cpp b/components/V4L2Encoder.cpp
index bd9a0f3..8ebd244 100644
--- a/components/V4L2Encoder.cpp
+++ b/components/V4L2Encoder.cpp
@@ -501,6 +501,7 @@ bool V4L2Encoder::configureInputFormat(media::VideoPixelFormat inputFormat, uint
media::Rect visibleRectangle(mVisibleSize.width(), mVisibleSize.height());
struct v4l2_rect rect;
+ memset(&rect, 0, sizeof(rect));
rect.left = visibleRectangle.x();
rect.top = visibleRectangle.y();
rect.width = visibleRectangle.width();