src/xvba_video_glx.c: fix refcounting surface.
A GLX surface can be in use by multiple VASurfaces, therefor make sure refcounting is done properly. The code did not honor this and could destroy a surface that was still in use by another GLX Surface object. The code is changed to enforce proper refcounting. Basically using destroy_glx_surface(driver_data, obj_glx_surface); is suspicious and should be replaced by: glx_surface_unref(driver_data, obj_glx_surface); instead. This function decreases the refcount on obj_glx_surface and when it reaches 0, then it destroys the surface properly.
Showing
Please register or sign in to comment