avfvideosrc: don't leak texture caches

If decide_allocation is called multiple times, then we would continually
overwrite the previous cache without freeing
This commit is contained in:
Matthew Waters 2019-08-28 20:09:39 +10:00 committed by GStreamer Merge Bot
parent e9891dfe14
commit 27f4fb060d

View file

@ -1095,6 +1095,7 @@ didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer
gst_video_texture_cache_free (textureCache);
textureCache = NULL;
}
if (!textureCache)
textureCache = gst_video_texture_cache_new (ctxh->context);
gst_video_texture_cache_set_format (textureCache, format, alloc_caps);
}