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

Steve Lhomme robux4 at ycbcr.xyz
Thu Dec 3 10:17:09 CET 2020


Same remark as the other csa patch. Even after patches 1 and 2 of this 
patchset p_sys->csa can be NULL:

static csa_t *csaSetup( vlc_object_t *p_this )
{
     char *csack = var_CreateGetNonEmptyStringCommand( p_mux, 
SOUT_CFG_PREFIX "csa-ck" );
     if( !csack )
         return NULL;


On 2020-12-02 20:46, remi at remlab.net wrote:
> 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
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
> 


More information about the vlc-devel mailing list