summaryrefslogtreecommitdiffstats
path: root/libvo/vosub_vidix.c
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-12-07 16:04:14 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-12-07 16:04:14 +0000
commit61e33567ab2286d591cc6fe905b835a9bca337f4 (patch)
treeadf956d4d9595efd96355f0642213c52464eb1ca /libvo/vosub_vidix.c
parent2d065d1c6dacff7e40353c39986ee4023c292740 (diff)
downloadmpv-61e33567ab2286d591cc6fe905b835a9bca337f4.tar.bz2
mpv-61e33567ab2286d591cc6fe905b835a9bca337f4.tar.xz
really clear frames to black instead of grey, and make sure one of those
cleared frames is actually shown (and not a leftover from last film, which happened at least with ATI cards). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17129 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo/vosub_vidix.c')
-rw-r--r--libvo/vosub_vidix.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/libvo/vosub_vidix.c b/libvo/vosub_vidix.c
index 83d16dd9c7..8cc45d2349 100644
--- a/libvo/vosub_vidix.c
+++ b/libvo/vosub_vidix.c
@@ -404,6 +404,7 @@ int vidix_init(unsigned src_width,unsigned src_height,
unsigned dst_height,unsigned format,unsigned dest_bpp,
unsigned vid_w,unsigned vid_h)
{
+ void *tmp, *tmpa;
size_t i;
int err;
uint32_t sstride,apitch;
@@ -495,14 +496,22 @@ int vidix_init(unsigned src_width,unsigned src_height,
vidix_mem = vidix_play.dga_addr;
- /* select first frame */
- next_frame = 0;
-// vdlPlaybackFrameSelect(vidix_handler,next_frame);
-
+ tmp = calloc(image_width, image_height);
+ tmpa = malloc(image_width * image_height);
+ memset(tmpa, 1, image_width * image_height);
/* clear every frame with correct address and frame_size */
- for (i = 0; i < vidix_play.num_frames; i++)
+ /* HACK: use draw_alpha to clear Y component */
+ for (i = 0; i < vidix_play.num_frames; i++) {
+ next_frame = i;
memset(vidix_mem + vidix_play.offsets[i], 0x80,
vidix_play.frame_size);
+ draw_alpha(0, 0, image_width, image_height, tmp, tmpa, image_width);
+ }
+ free(tmp);
+ free(tmpa);
+ /* show one of the "clear" frames */
+ vidix_flip_page();
+
switch(format)
{
case IMGFMT_YV12: