[vlc-commits] [Git][videolan/vlc][3.0.x] amf: fix crash when enabling AMF filters on non-AMD GPUs

Felix Paul Kühne (@fkuehne) gitlab at videolan.org
Tue May 13 17:49:55 UTC 2025



Felix Paul Kühne pushed to branch 3.0.x at VideoLAN / VLC


Commits:
5748ee2f by Steve Lhomme at 2025-05-13T17:26:00+00:00
amf: fix crash when enabling AMF filters on non-AMD GPUs

- - - - -


2 changed files:

- modules/video_filter/amf_frc.c
- modules/video_filter/amf_vqenhancer.c


Changes:

=====================================
modules/video_filter/amf_frc.c
=====================================
@@ -201,7 +201,9 @@ int D3D11CreateAMFFRC(vlc_object_t *p_this)
     if (dev_sys->d3d_dev.adapterDesc.VendorId != GPU_MANUFACTURER_AMD)
     {
         msg_Err(filter, "AMF filter only supported with AMD GPUs");
-        goto error;
+        D3D11_FilterReleaseInstance(&sys->d3d_dev);
+        D3D11_Destroy(&sys->hd3d);
+        return VLC_EGENERIC;
     }
 
     config_ChainParse( filter, "", ppsz_filter_options, filter->p_cfg );


=====================================
modules/video_filter/amf_vqenhancer.c
=====================================
@@ -180,7 +180,9 @@ int D3D11CreateAMFVQE(vlc_object_t *p_this)
     if (dev_sys->d3d_dev.adapterDesc.VendorId != GPU_MANUFACTURER_AMD)
     {
         msg_Err(filter, "AMF filter only supported with AMD GPUs");
-        goto error;
+        D3D11_FilterReleaseInstance(&sys->d3d_dev);
+        D3D11_Destroy(&sys->hd3d);
+        return VLC_EGENERIC;
     }
 
     DXGI_FORMAT input_format = dstDesc.Format;



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/5748ee2f1da8f1495bb0295df9d32ef614ca40a9

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/5748ee2f1da8f1495bb0295df9d32ef614ca40a9
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list