• Jean-Paul Saman's avatar
    src/xvba_video_glx.c: fix refcounting surface. · 8a9898b6
    Jean-Paul Saman authored
    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.
    8a9898b6
xvba_video_glx.c 76.5 KB