[vlc-devel] [PATCH 3/3] csa: do not handle impossibly NULL object

remi at remlab.net remi at remlab.net
Wed Dec 2 20:46:24 CET 2020


From: RĂ©mi Denis-Courmont <remi at remlab.net>

---
 modules/mux/mpeg/csa.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/modules/mux/mpeg/csa.c b/modules/mux/mpeg/csa.c
index e6363cd965..ba16865f48 100644
--- a/modules/mux/mpeg/csa.c
+++ b/modules/mux/mpeg/csa.c
@@ -78,11 +78,8 @@ void csa_Delete( csa_t *c )
  *****************************************************************************/
 int csa_SetCW( vlc_object_t *p_caller, csa_t *c, char *psz_ck, bool set_odd )
 {
-    if ( !c )
-    {
-        msg_Dbg( p_caller, "no CSA found" );
-        return VLC_ENOOBJ;
-    }
+    assert(c != NULL);
+
     /* skip 0x */
     if( psz_ck[0] == '0' && ( psz_ck[1] == 'x' || psz_ck[1] == 'X' ) )
     {
-- 
2.29.2



More information about the vlc-devel mailing list