Commit 51595991 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

dxva2: use AVFrame.opaque to store internal per-picture state directly

parent 2392db7d
......@@ -468,19 +468,15 @@ static int Get(vlc_va_t *external, AVFrame *ff)
if (i == 0 || i == 3)
ff->data[i] = (void*)surface->d3d;/* Yummie */
}
ff->opaque = surface;
return VLC_SUCCESS;
}
static void Release(vlc_va_t *external, AVFrame *ff)
{
vlc_va_dxva2_t *va = vlc_va_dxva2_Get(external);
LPDIRECT3DSURFACE9 d3d = (LPDIRECT3DSURFACE9)(uintptr_t)ff->data[3];
for (unsigned i = 0; i < va->surface_count; i++) {
vlc_va_surface_t *surface = &va->surface[i];
vlc_va_surface_t *surface = ff->opaque;
if (surface->d3d == d3d)
surface->refcount--;
}
surface->refcount--;
(void) external;
}
static void Close(vlc_va_t *external)
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment