Commit 10821ecd authored by Jean-Paul Saman's avatar Jean-Paul Saman

VAAPI-X11: cleanup Render() function

parent 6a040559
...@@ -1281,41 +1281,6 @@ static void Render(vout_display_t *vd, picture_t *picture, subpicture_t *subpict ...@@ -1281,41 +1281,6 @@ static void Render(vout_display_t *vd, picture_t *picture, subpicture_t *subpict
return; return;
assert(!subpicture->b_ephemer); assert(!subpicture->b_ephemer);
/* Cleanup for reclaimed surface */
if (picture->p_sys &&
(picture->p_sys->i_cache != VA_INVALID_ID) &&
(picture->format.i_chroma == VLC_CODEC_VAAPI_SURFACE))
{
assert(0);
#if 0
picture_sys_t *surface = picture->p_sys;
if (surface->i_cache != VA_INVALID_ID)
{
vlc_mutex_lock(&sys->cache_lock);
#ifdef VAAPI_DEBUG
msg_Dbg(vd, "unlink surface %d cache %d", surface->i_id, surface->i_cache);
#endif
subpicture_cache_t *cache = cache_find(&sys->cache, surface->i_cache);
assert(cache);
const int count = vlc_array_count(&cache->subpictures);
for (unsigned int i = 0; i < count; i++)
{
vasubpicture_cache_t *sub = vlc_array_item_at_index(&cache->subpictures, i);
assert(sub);
#ifdef VAAPI_DEBUG
msg_Dbg(vd, "- %u: subid %d", i, sub->i_id);
#endif
VAStatus status = SubpictureUnlink(sys->conn, surface->i_id, sub->i_id);
if (status != VA_STATUS_SUCCESS)
msg_Err(vd, "failed unlinking (error %d)", status);
}
vlc_mutex_unlock(&sys->cache_lock);
}
#endif
}
assert(picture->format.i_chroma == VLC_CODEC_VAAPI_SURFACE); assert(picture->format.i_chroma == VLC_CODEC_VAAPI_SURFACE);
if (!picture->p_sys) if (!picture->p_sys)
......
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