[vlc-commits] vt_utils: code cleaning

Steve Lhomme git at videolan.org
Wed Nov 20 08:42:45 CET 2019


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Wed Nov 20 07:36:33 2019 +0100| [1635b96b2a05c504eee783218d1928bd387912dc] | committer: Steve Lhomme

vt_utils: code cleaning

It's better this way to spot missing mandatory fields.

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

 modules/codec/vt_utils.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/modules/codec/vt_utils.c b/modules/codec/vt_utils.c
index 88224c4e5f..cb71dae139 100644
--- a/modules/codec/vt_utils.c
+++ b/modules/codec/vt_utils.c
@@ -87,8 +87,9 @@ cvpxpic_attach_common(picture_t *p_pic, CVPixelBufferRef cvpx,
         picture_Release(p_pic);
         return VLC_ENOMEM;
     }
-    ctx->s.destroy = pf_destroy;
-    ctx->s.copy = cvpxpic_copy_cb;
+    ctx->s = (picture_context_t) {
+        pf_destroy, cvpxpic_copy_cb,
+    };
     ctx->cvpx = CVPixelBufferRetain(cvpx);
     ctx->nb_fields = p_pic->i_nb_fields;
     vlc_atomic_rc_init(&ctx->rc);



More information about the vlc-commits mailing list