FFmpeg: Don't leak EGL images and GL textures on VAAPI import failure


createTextureHandles() generates one GL texture per plane up front and
creates an EGLImage per plane inside the import loop. When
eglCreateImage failed for a plane, it returned early without deleting
the textures or destroying the images created for the preceding planes,
leaking both for every frame that hits the failure.

So we destroy them in the early-return codepaths

Pick-to: 6.12 6.11 6.8
Change-Id: Ia594d644df5b9f938fb47346666892f61e44b646
Reviewed-by: Nils Petter Skålerud <nils.petter.skalerud@qt.io>
Reviewed-by: Tim Blechmann <tim.blechmann@qt.io>
commit2fb93e3d7e42e1ad9a46267a2d77a9078fa79fc2
parentdad9fbd9b8b9c7421867c838b8445ce715d0fef8
authorTim Blechmann <tim.blechmann@qt.io>
committerTim Blechmann <tim.blechmann@qt.io>
commit timeThu, 6 Aug 2026 01:28:25 +0000