[vlc-commits] d3d9: code cleaning

Steve Lhomme git at videolan.org
Thu Jun 13 15:09:57 CEST 2019


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Wed Jun 12 15:16:17 2019 +0200| [ca7bfeec618e5f3eaa9c914b60059803c7de6ad5] | committer: Steve Lhomme

d3d9: code cleaning

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ca7bfeec618e5f3eaa9c914b60059803c7de6ad5
---

 modules/codec/avcodec/d3d11va.c | 3 +--
 modules/codec/avcodec/dxva2.c   | 3 +--
 modules/video_chroma/d3d9_fmt.c | 2 +-
 3 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/modules/codec/avcodec/d3d11va.c b/modules/codec/avcodec/d3d11va.c
index 141a039ef2..c02844f0da 100644
--- a/modules/codec/avcodec/d3d11va.c
+++ b/modules/codec/avcodec/d3d11va.c
@@ -139,9 +139,8 @@ static int DxSetupOutput(vlc_va_t *, const GUID *, const video_format_t *);
 static int DxCreateDecoderSurfaces(vlc_va_t *, int codec_id,
                                    const video_format_t *fmt, unsigned surface_count);
 static void DxDestroySurfaces(vlc_va_t *);
-static void SetupAVCodecContext(vlc_va_t *);
 
-void SetupAVCodecContext(vlc_va_t *va)
+static void SetupAVCodecContext(vlc_va_t *va)
 {
     vlc_va_sys_t *sys = va->sys;
     directx_sys_t *dx_sys = &sys->dx_sys;
diff --git a/modules/codec/avcodec/dxva2.c b/modules/codec/avcodec/dxva2.c
index 9471cb5be1..194e5ca895 100644
--- a/modules/codec/avcodec/dxva2.c
+++ b/modules/codec/avcodec/dxva2.c
@@ -151,9 +151,8 @@ static int DxSetupOutput(vlc_va_t *, const GUID *, const video_format_t *);
 static int DxCreateVideoDecoder(vlc_va_t *, int codec_id,
                                 const video_format_t *, unsigned surface_count);
 static void DxDestroyVideoDecoder(vlc_va_t *);
-static void SetupAVCodecContext(vlc_va_t *);
 
-void SetupAVCodecContext(vlc_va_t *va)
+static void SetupAVCodecContext(vlc_va_t *va)
 {
     vlc_va_sys_t *sys = va->sys;
     directx_sys_t *dx_sys = &sys->dx_sys;
diff --git a/modules/video_chroma/d3d9_fmt.c b/modules/video_chroma/d3d9_fmt.c
index 0f33544925..63b550164f 100644
--- a/modules/video_chroma/d3d9_fmt.c
+++ b/modules/video_chroma/d3d9_fmt.c
@@ -266,7 +266,7 @@ error:
 int D3D9_CreateExternal(vlc_object_t *o, d3d9_handle_t *hd3d, IDirect3DDevice9 *d3d9dev)
 {
     HRESULT hr = IDirect3DDevice9_GetDirect3D(d3d9dev, &hd3d->obj);
-    if (FAILED(hr))
+    if (unlikely(FAILED(hr)))
         return VLC_EGENERIC;
     hd3d->hdll = NULL;
     hd3d->use_ex = false; /* we don't care */



More information about the vlc-commits mailing list