[vlc-devel] [PATCH 3/3] csa: do not handle impossibly NULL object
Rémi Denis-Courmont
remi at remlab.net
Thu Dec 3 17:32:07 CET 2020
Le torstaina 3. joulukuuta 2020, 11.17.09 EET Steve Lhomme a écrit :
> Same remark as the other csa patch.
What remark?
> Even after patches 1 and 2 of this patchset p_sys->csa can be NULL:
And so what?
>
> 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' ) )
> > {
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
--
レミ・デニ-クールモン
http://www.remlab.net/
More information about the vlc-devel
mailing list