[vlc-commits] csa: do not handle impossibly NULL object

Rémi Denis-Courmont git at videolan.org
Fri Dec 4 15:47:32 UTC 2020


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Nov 30 23:58:49 2020 +0200| [7a388292db3dbed309630f1125bfe59386044062] | committer: Rémi Denis-Courmont

csa: do not handle impossibly NULL object

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

 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' ) )
     {



More information about the vlc-commits mailing list