diff options
author | Alessandro Decina <alessandro.d@gmail.com> | 2016-06-02 13:10:51 +1000 |
---|---|---|
committer | Alessandro Decina <alessandro.d@gmail.com> | 2016-06-02 17:04:45 +1000 |
commit | 3182a32e373ce0f8f58c043b3d02265de03744a2 (patch) | |
tree | 01e783b2790d06fc969d42145b4795ff2289cf32 | |
parent | 6dc3b45b719f8d6bcd09c70a109fac0d7912c72e (diff) | |
download | gstreamer-plugins-bad-3182a32e373ce0f8f58c043b3d02265de03744a2.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
-rw-r--r-- | sys/applemedia/vtdec.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/applemedia/vtdec.c b/sys/applemedia/vtdec.c index 9309b2a39..ec2ba24c7 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 |