We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 457

Summary: YUV Overlay and OpenGL
Product: SDL Reporter: Stefan Bradl <stefan_bradl>
Component: videoAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: 1.2.11   
Hardware: x86   
OS: Linux   

Description Stefan Bradl 2007-07-13 13:06:46 UTC
I followed this tutorial for playing videos with sdl 
http://www.dranger.com/ffmpeg/ 
and found out that sdl crashes when I use 
SDL_SetVideoMode(...) with SDL_OPENGL.
Comment 1 Sam Lantinga 2007-07-15 07:26:09 UTC
I believe this is fixed in SDL 1.2.12:
Couldn't create overlay: YUV overlays are not supported in OpenGL mode
Comment 2 Stefan Bradl 2007-07-15 12:57:33 UTC
Tried out SDL 1.2.12 but the bug still exists
Comment 3 Sam Lantinga 2007-07-15 12:59:59 UTC
Can you attach a simple test case that shows the problem?
Comment 4 Stefan Bradl 2007-07-15 13:07:28 UTC
ok I'll try to make a little test case because the project where i found this problem is a little bit bigger...
Comment 5 Stefan Bradl 2007-07-15 14:12:27 UTC
http://madrenegade.smithtec.de/BugTestCase.tar.bz2
Comment 6 Sam Lantinga 2007-07-15 14:34:51 UTC
I'm taking a look at it now...
Comment 7 Sam Lantinga 2007-07-15 14:55:30 UTC
So it is actually failing and returning a NULL overlay surface.  Whatever library you're using isn't checking the return value.  I fixed it so it isn't crashing in SDL anymore, but the application still crashes because it assumes that it got a valid overlay.
Comment 8 Stefan Bradl 2007-07-16 02:54:42 UTC
but why fails 
SDL_CreateYUVOverlay() only when OpenGL is initialized?
Comment 9 Stefan Bradl 2007-07-16 02:59:30 UTC
ah ok I understand...yuv overlays are generally not supported in in opengl...
Is there a workaround for this problem because I need to play videos in an OpenGL window.
Comment 10 Sam Lantinga 2007-07-16 07:14:19 UTC
Take a look at the glmovie test program in the SMPEG source
http://www.icculus.org/smpeg/