summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorAlessandro Decina <alessandro.d@gmail.com>2016-06-02 13:10:51 +1000
committerAlessandro Decina <alessandro.d@gmail.com>2016-06-02 13:15:05 +1000
commit4a83686a57818e182672b25e5040ea5ba0141f03 (patch)
tree5509995e54aa84920d49a1175e6badb65798eb28 /sys
parentbf444301f998b5aff1fd7e7d18cf7edc2a42b68b (diff)
downloadgstreamer-plugins-bad-4a83686a57818e182672b25e5040ea5ba0141f03.tar.gz
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
Diffstat (limited to 'sys')
-rw-r--r--sys/applemedia/vtdec.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/applemedia/vtdec.c b/sys/applemedia/vtdec.c
index 7f96bd96a..7e27bc755 100644
--- a/sys/applemedia/vtdec.c
+++ b/sys/applemedia/vtdec.c
@@ -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