vtdec: fix switching from GLMemory to Sysmem

When renegotiating from GLMemory to Sysmem do teardown the texture_cache.

Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=766190
This commit is contained in:
Alessandro Decina 2016-06-02 13:10:51 +10:00
parent bf444301f9
commit 4a83686a57

View file

@ -284,6 +284,11 @@ gst_vtdec_negotiate (GstVideoDecoder * decoder)
ret = gst_vtdec_create_session (vtdec, format);
}
if (vtdec->texture_cache != NULL && !output_textures) {
gst_video_texture_cache_free (vtdec->texture_cache);
vtdec->texture_cache = NULL;
}
if (ret && output_textures) {
/* call this regardless of whether caps have changed or not since a new
* local context could have become available