# XVideo Refresh Bug

**URL:** <https://discourse.libsdl.org/t/xvideo-refresh-bug/4980>\
**Category:** SDL Development\
**Created:** [August 27, 2001, 7:47pm UTC](https://discourse.libsdl.org/t/xvideo-refresh-bug/4980 "2001-08-27T19:47:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Billy\_Biggs](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/b/e99b99/32.png) [@Billy\_Biggs](https://discourse.libsdl.org/u/Billy_Biggs)\
**Post date:** [August 27, 2001, 7:47pm UTC](https://discourse.libsdl.org/t/xvideo-refresh-bug/4980/1 "2001-08-27T19:47:01Z")

</div>

XVideo keeps no copy on the server of the images you post to an  
overlay surface. So, when you’re showing a static image (for example in  
an image viewer, or a paused movie), the application must redraw the  
image on expose events from the X server, otherwise you’ll just get a  
blank window.

SDL (correctly) doesn’t keep a copy of the overlay surface you blit,  
and it can’t be sure that the last one you gave it hasn’t been modified.  
Therefore, I think the correct solution is for SDL to post VIDEOEXPOSE  
events when XVideo is being used. This will allow for a correct image  
to be blit by the application.

Thoughts? Currently, my video player has to keep blitting images  
over-and-over again when I’m showing a still to work around this bug. ☹

As an aside, I don’t think the YUVOverlay name is correct. Many cards  
have RGB overlay surfaces, and are starting to expose them. Also, I  
think XVideo is a great way to allow for cards to expose hardare 2D  
scaling under X.–  
Billy Biggs bbiggs at [dumbterm.net](http://dumbterm.net)  
[http://www.billybiggs.com/](http://www.billybiggs.com/) wbiggs at [uwaterloo.ca](http://uwaterloo.ca)  
-------------- next part --------------  
A non-text attachment was scrubbed…  
Name: not available  
Type: application/pgp-signature  
Size: 232 bytes  
Desc: not available  
URL: [http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20010827/656041eb/attachment.pgp](http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20010827/656041eb/attachment.pgp)

---

<div class="post-metadata">

**Author:** ![slouken](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/s/ec9cab/32.png) [@slouken](https://discourse.libsdl.org/u/slouken)\
**Post date:** [August 31, 2001, 2:06pm UTC](https://discourse.libsdl.org/t/xvideo-refresh-bug/4980/2 "2001-08-31T14:06:01Z")

</div>

> SDL (correctly) doesn’t keep a copy of the overlay surface you blit,  
> and it can’t be sure that the last one you gave it hasn’t been modified.  
> Therefore, I think the correct solution is for SDL to post VIDEOEXPOSE  
> events when XVideo is being used. This will allow for a correct image  
> to be blit by the application.

You got it. 🙂  
This is now the behavior in the latest CVS.

> As an aside, I don’t think the YUVOverlay name is correct. Many cards  
> have RGB overlay surfaces, and are starting to expose them. Also, I  
> think XVideo is a great way to allow for cards to expose hardare 2D  
> scaling under X.

Yep. This will be remedied in SDL 1.3

See ya,  
-Sam Lantinga, Software Engineer, Blizzard Entertainment
