[vlc-commits] vdpau: reorder

Rémi Denis-Courmont git at videolan.org
Mon Jun 5 18:46:56 CEST 2017


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Jun  5 19:34:35 2017 +0300| [63ae28a02e2cd84d729ec771710821184cf22bd8] | committer: Rémi Denis-Courmont

vdpau: reorder

No functional changes.

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

 modules/hw/vdpau/picture.c | 34 +++++++++++++++++-----------------
 1 file changed, 17 insertions(+), 17 deletions(-)

diff --git a/modules/hw/vdpau/picture.c b/modules/hw/vdpau/picture.c
index 29e6be9c4a..18c6ce97fd 100644
--- a/modules/hw/vdpau/picture.c
+++ b/modules/hw/vdpau/picture.c
@@ -56,6 +56,23 @@ static void SurfaceDestroy(struct picture_context_t *ctx)
     free(frame);
 }
 
+vlc_vdp_video_field_t *vlc_vdp_video_copy(vlc_vdp_video_field_t *fold)
+{
+    vlc_vdp_video_frame_t *frame = fold->frame;
+    vlc_vdp_video_field_t *fnew = malloc(sizeof (*fnew));
+    if (unlikely(fnew == NULL))
+        return NULL;
+
+    fnew->context.destroy = SurfaceDestroy;
+    fnew->frame = frame;
+    fnew->structure = fold->structure;
+    fnew->procamp = fold->procamp;
+    fnew->sharpen = fold->sharpen;
+
+    atomic_fetch_add(&frame->refs, 1);
+    return fnew;
+}
+
 static const VdpProcamp procamp_default =
 {
     .struct_version = VDP_PROCAMP_VERSION,
@@ -105,20 +122,3 @@ VdpStatus vlc_vdp_video_attach(vdp_t *vdp, VdpVideoSurface surface,
     pic->context = &field->context;
     return VDP_STATUS_OK;
 }
-
-vlc_vdp_video_field_t *vlc_vdp_video_copy(vlc_vdp_video_field_t *fold)
-{
-    vlc_vdp_video_frame_t *frame = fold->frame;
-    vlc_vdp_video_field_t *fnew = malloc(sizeof (*fnew));
-    if (unlikely(fnew == NULL))
-        return NULL;
-
-    fnew->context.destroy = SurfaceDestroy;
-    fnew->frame = frame;
-    fnew->structure = fold->structure;
-    fnew->procamp = fold->procamp;
-    fnew->sharpen = fold->sharpen;
-
-    atomic_fetch_add(&frame->refs, 1);
-    return fnew;
-}



More information about the vlc-commits mailing list