Why can't display two yuvoverlay?

I writed a simple program to show yuv file.

It simple called SDL_CreateYUVOverlay and copied yuv data into pixels. It
worked correctly.

However, if I started another instance to show other file, It just gave me a
dark and blank window.

What’s wrong?

My code was like yuvplay.c in mjpegtools project. The same problem showed up
when I tried to run two yuvplay.

Thanks for help! :)_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it’s FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

jian liu wrote:

I writed a simple program to show yuv file.

It simple called SDL_CreateYUVOverlay and copied yuv data into pixels.
It worked correctly.

However, if I started another instance to show other file, It just
gave me a dark and blank window.

What’s wrong?

SDL uses XVideo for YUV overlays on the screen, but most cards can’t
handle more than one application which uses XVideo. You can ether set
enironment variable SDL_VIDEO_YUV_HWACCEL to 1 or use non-screen
surfaces as destination for overlays. Notice than anyway you will get
some slowdown.

Hello, jian!

jl> However, if I started another instance to show other file, It just gave
jl> me a dark and blank window.
jl> What’s wrong?

Don’t forget about hardware limitations for the overlays, some video cards
have support for one hw overlay only.

With best regards, Mike Gorchak. E-mail: @Mike_Gorchak