mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
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:
parent
e9891dfe14
commit
27f4fb060d
1 changed files with 2 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue