[vlc-commits] vt_utils: vctx is now mandatory

Thomas Guillem git at videolan.org
Fri Jan 10 13:02:13 CET 2020


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Thu Jan  9 15:38:23 2020 +0100| [3930fd84e11757de86d98ca6204456dee74da6e4] | committer: Thomas Guillem

vt_utils: vctx is now mandatory

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

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

diff --git a/modules/codec/vt_utils.c b/modules/codec/vt_utils.c
index 067c197e15..55375dc2ff 100644
--- a/modules/codec/vt_utils.c
+++ b/modules/codec/vt_utils.c
@@ -71,8 +71,7 @@ cvpxpic_copy_cb(struct picture_context_t *opaque)
 {
     struct cvpxpic_ctx *ctx = (struct cvpxpic_ctx *)opaque;
     vlc_atomic_rc_inc(&ctx->rc);
-    if (opaque->vctx)
-        vlc_video_context_Hold(opaque->vctx);
+    vlc_video_context_Hold(opaque->vctx);
     return opaque;
 }
 
@@ -95,8 +94,8 @@ cvpxpic_attach_common(picture_t *p_pic, CVPixelBufferRef cvpx,
     ctx->nb_fields = p_pic->i_nb_fields;
     vlc_atomic_rc_init(&ctx->rc);
 
-    if (vctx)
-        vlc_video_context_Hold(vctx);
+    assert(vctx);
+    vlc_video_context_Hold(vctx);
     ctx->on_released_cb = on_released_cb;
 
     p_pic->context = &ctx->s;



More information about the vlc-commits mailing list