[vlc-commits] resource: add an assertion

Rémi Denis-Courmont git at videolan.org
Fri Jan 18 22:12:41 CET 2019


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Fri Jan 18 19:40:20 2019 +0200| [57eb022892d75b964095528deadfdbe1e69b73ff] | committer: Rémi Denis-Courmont

resource: add an assertion

After the previous changeset, the three outstanding calls of
input_resource_RequestVout() are patently passing a non-NULL second
parameter. Assert it for clarity.

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

 src/input/resource.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/input/resource.c b/src/input/resource.c
index 096efc19b5..d795e0b286 100644
--- a/src/input/resource.c
+++ b/src/input/resource.c
@@ -469,6 +469,8 @@ vout_thread_t *input_resource_RequestVout( input_resource_t *p_resource,
                                            const vout_configuration_t *cfg,
                                            bool b_recycle )
 {
+    assert(cfg != NULL);
+
     vlc_mutex_lock( &p_resource->lock );
     vout_thread_t *p_ret = RequestVout( p_resource, cfg, b_recycle );
     vlc_mutex_unlock( &p_resource->lock );



More information about the vlc-commits mailing list