mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-19 16:21:17 +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,7 +1095,8 @@ didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer
|
||||||
gst_video_texture_cache_free (textureCache);
|
gst_video_texture_cache_free (textureCache);
|
||||||
textureCache = NULL;
|
textureCache = NULL;
|
||||||
}
|
}
|
||||||
textureCache = gst_video_texture_cache_new (ctxh->context);
|
if (!textureCache)
|
||||||
|
textureCache = gst_video_texture_cache_new (ctxh->context);
|
||||||
gst_video_texture_cache_set_format (textureCache, format, alloc_caps);
|
gst_video_texture_cache_set_format (textureCache, format, alloc_caps);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue