mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
st/vdpau: fix two small memory leaks
Signed-off-by: Christian König <deathsimple@vodafone.de>
This commit is contained in:
parent
2e5f3cdca5
commit
9a3c2776ac
2 changed files with 6 additions and 2 deletions
|
|
@ -292,8 +292,8 @@ vlVdpResolveDelayedRendering(vlVdpDevice *dev, struct pipe_surface *surface, str
|
|||
struct pipe_sampler_view sv_templ;
|
||||
|
||||
vlVdpDefaultSamplerViewTemplate(&sv_templ, res);
|
||||
pipe_sampler_view_reference(&vlsurface->sampler_view,
|
||||
dev->context->create_sampler_view(dev->context, res, &sv_templ));
|
||||
pipe_sampler_view_reference(&vlsurface->sampler_view, NULL);
|
||||
vlsurface->sampler_view = dev->context->create_sampler_view(dev->context, res, &sv_templ);
|
||||
}
|
||||
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -133,16 +133,20 @@ VdpStatus
|
|||
vlVdpOutputSurfaceDestroy(VdpOutputSurface surface)
|
||||
{
|
||||
vlVdpOutputSurface *vlsurface;
|
||||
struct pipe_context *pipe;
|
||||
|
||||
vlsurface = vlGetDataHTAB(surface);
|
||||
if (!vlsurface)
|
||||
return VDP_STATUS_INVALID_HANDLE;
|
||||
|
||||
pipe = vlsurface->device->context;
|
||||
|
||||
pipe_mutex_lock(vlsurface->device->mutex);
|
||||
vlVdpResolveDelayedRendering(vlsurface->device, NULL, NULL);
|
||||
|
||||
pipe_surface_reference(&vlsurface->surface, NULL);
|
||||
pipe_sampler_view_reference(&vlsurface->sampler_view, NULL);
|
||||
pipe->screen->fence_reference(pipe->screen, &vlsurface->fence, NULL);
|
||||
vl_compositor_cleanup_state(&vlsurface->cstate);
|
||||
pipe_mutex_unlock(vlsurface->device->mutex);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue