avfilter/framepool: fix frame pool uninit check

Fixes a memory leak caused by AV_MEDIA_TYPE_VIDEO == 0 being excluded by
the !pool->type check. We can just remove the entire check because
av_buffer_pool_uninit() is already safe on NULL.

Fixes: fe2691b3bb
Reported-by: Kacper Michajłow <kasper93@gmail.com>
Signed-off-by: Niklas Haas <git@haasn.dev>
This commit is contained in:
Niklas Haas
2026-04-10 21:58:24 +02:00
parent e43aab67ed
commit ef13a29d08
-3
View File
@@ -214,9 +214,6 @@ fail:
av_cold void ff_frame_pool_uninit(FFFramePool *pool)
{
if (!pool->type)
return;
for (int i = 0; i < 4; i++)
av_buffer_pool_uninit(&pool->pools[i]);