From: Torsten J. <t....@gm...> - 2013-02-21 20:31:04
|
# HG changeset patch # User Torsten Jager <t....@gm...> # Date 1361477784 -7200 # Node ID 31d88870e54d3fbd19174cfc479254dc593bc5d4 # Branch default # Parent f2b6bf35b62d39f21f50c34613021cd2d3828c65 video_out_opengl2: black fill new buffer This fixes dark green edges. diff --git a/src/video_out/video_out_opengl2.c b/src/video_out/video_out_opengl2.c --- a/src/video_out/video_out_opengl2.c +++ b/src/video_out/video_out_opengl2.c @@ -769,8 +769,10 @@ frame->vo_frame.pitches[1] = ((width + 15) & ~15) >> 1; frame->vo_frame.pitches[2] = ((width + 15) & ~15) >> 1; frame->vo_frame.base[0] = av_mallocz (frame->vo_frame.pitches[0] * height); - frame->vo_frame.base[1] = av_mallocz (frame->vo_frame.pitches[1] * ((height+1)/2)); - frame->vo_frame.base[2] = av_mallocz (frame->vo_frame.pitches[2] * ((height+1)/2)); + frame->vo_frame.base[1] = av_malloc (frame->vo_frame.pitches[1] * ((height+1)/2)); + frame->vo_frame.base[2] = av_malloc (frame->vo_frame.pitches[2] * ((height+1)/2)); + memset (frame->vo_frame.base[1], 128, frame->vo_frame.pitches[1] * ((height+1)/2)); + memset (frame->vo_frame.base[2], 128, frame->vo_frame.pitches[2] * ((height+1)/2)); } else if (format == XINE_IMGFMT_YUY2){ frame->vo_frame.pitches[0] = ((width + 15) & ~15) << 1; frame->vo_frame.base[0] = av_mallocz (frame->vo_frame.pitches[0] * height); |