[vlc-commits] vdpau/avcodec: reorder code

Rémi Denis-Courmont git at videolan.org
Wed Jul 17 21:05:36 CEST 2019


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Jul 17 21:53:48 2019 +0300| [e70189bc51d3453552f8a0d008f5d35ca3959bb9] | committer: Rémi Denis-Courmont

vdpau/avcodec: reorder code

Non-functional change.

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

 modules/hw/vdpau/avcodec.c | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/modules/hw/vdpau/avcodec.c b/modules/hw/vdpau/avcodec.c
index 3576b003ca..8186a70906 100644
--- a/modules/hw/vdpau/avcodec.c
+++ b/modules/hw/vdpau/avcodec.c
@@ -117,6 +117,17 @@ static int Lock(vlc_va_t *va, picture_t *pic, uint8_t **data)
     return VLC_SUCCESS;
 }
 
+static void Close(vlc_va_t *va, void **hwctx)
+{
+    vlc_va_sys_t *sys = va->sys;
+
+    for (unsigned i = 0; sys->pool[i] != NULL; i++)
+        vlc_vdp_video_destroy(sys->pool[i]);
+    vdp_release_x11(sys->vdp);
+    av_freep(hwctx);
+    free(sys);
+}
+
 static int Open(vlc_va_t *va, AVCodecContext *avctx, enum PixelFormat pix_fmt,
                 const es_format_t *fmt, void *p_sys)
 {
@@ -213,17 +224,6 @@ error:
     return VLC_EGENERIC;
 }
 
-static void Close(vlc_va_t *va, void **hwctx)
-{
-    vlc_va_sys_t *sys = va->sys;
-
-    for (unsigned i = 0; sys->pool[i] != NULL; i++)
-        vlc_vdp_video_destroy(sys->pool[i]);
-    vdp_release_x11(sys->vdp);
-    av_freep(hwctx);
-    free(sys);
-}
-
 vlc_module_begin()
     set_description(N_("VDPAU video decoder"))
     set_capability("hw decoder", 100)



More information about the vlc-commits mailing list