lately, I've been working on trying to let the VDPAU decoder render SD contents flawlessly, including DVD menus and subtitles. I first made some tries with letting VDPAU render subtitle overlays (a work much similar to the one recently proposed by Kirov for Ass subtitles). I had some results with this approach, but decided this was not the way to go.
Then I noticed the work done by elupus to let all overlays be opengl rendered when possible: by re-enabling the vdpau decoder for sd contents, this work showed some problems with the dvd menus overlays (but it was properly working for subtitles).
My last idea, and this is my current approach, has been to deploy two different decoders, according to the context which the player is in: if IsInMenu(), then deploy a libmpeg2 decoder, if not a ffmpeg-vdpau one.
Here the problems come: the dvd correctly starts with menus, then correctly switches to the movie. But if you, then, want to come back to the menu, it gets stuck. After a deep debugging I isolated the problem in the sequence:
if ((result = glIsTexture(fields[f][p].id)))
CLog::Log(LOGDEBUG, "GL: Deleting texture field %d plane %d", f+1, p+1);
in the context of CLinuxRendererGL::DeleteYV12Texture().
It seems that the code gets stuck in the glDeleteTextures call.
This code is accessed when switching the context from the vdpau decoder to the libmpeg2 one (movie -> menu). If I comment out the deleteTexture, the switch gets correctly done (although, I cannot come back again to the movie, yet).
Any idea why that call should behave as a blocking one? (the glIsTexture correctly returns true).
I'm getting lost, here, for lack of experience in the graphics field, I guess.
Any help would be much appreciated.