From d6f9a2d0e5f2ef3349a4cd3786819f736d65a6ef Mon Sep 17 00:00:00 2001 From: Martin Pulec Date: Tue, 5 Apr 2016 15:57:30 +0200 Subject: [PATCH] Border video postprocessor: fixed shifted content --- src/vo_postprocess/border.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/vo_postprocess/border.cpp b/src/vo_postprocess/border.cpp index e8a29c854..a3b2c1b5f 100644 --- a/src/vo_postprocess/border.cpp +++ b/src/vo_postprocess/border.cpp @@ -49,7 +49,7 @@ #include "vo_postprocess.h" struct state_border { - struct video_desc saved_desc; + struct video_desc saved_desc = {}; uint8_t color[4] = { 0xff, 0xff, 0x00, 0xff }; ///< border color in RGBA unsigned int width = 10; ///< border width in pixels (must be even) }; @@ -135,8 +135,7 @@ static bool border_postprocess(void *state, struct video_frame *in, struct video struct state_border *s = (struct state_border *) state; - memcpy(out->tiles[0].data + s->width * req_pitch, in->tiles[0].data, in->tiles[0].data_len - - 2 * s->width * req_pitch); + memcpy(out->tiles[0].data + s->width * req_pitch, in->tiles[0].data + s->width * req_pitch, in->tiles[0].data_len - 2 * s->width * req_pitch); if (in->color_spec == UYVY) { uint32_t rgba[2]{};