- video_frame.len = width * height * 2;
- memset(video_frame.data, 0, width * height);
- memset(video_frame.data + width * height, 128, width * height); // Valid for both NV12 and planar.
+ video_frame.len = frame_width * frame_height * 2;
+ memset(video_frame.data, 0, frame_width * frame_height);
+ memset(video_frame.data + frame_width * frame_height, 128, frame_width * frame_height); // Valid for both NV12 and planar.