[vlc-devel] commit: record: implement record-file (Erwan Tulou )

Laurent Aimar fenrir at via.ecp.fr
Sat Aug 29 23:48:14 CEST 2009


On Sat, Aug 29, 2009, Laurent Aimar wrote:
> On Sat, Aug 29, 2009, Laurent Aimar wrote:
> > On Sat, Aug 29, 2009, git version control wrote:
> > >      sout_stream_sys_t *p_sys = p_stream->p_sys;
> > > +    char *psz_file;
> > >      char *psz_output;
> > >      int i_count;
> > >  
> > > -    if( asprintf( &psz_output, "std{access=file,mux='%s',dst='%s%s%s'}",
> > > -                  psz_muxer, psz_prefix, psz_extension ? "." : "", psz_extension ? psz_extension : "" ) < 0 )
> > > -        return -1;
> > > +    if( asprintf( &psz_file, "%s%s%s",
> > > +                  psz_prefix, psz_extension ? "." : "", psz_extension ? psz_extension : "" ) < 0 )
> > > +    {
> > > +        psz_file = NULL;
> > > +        goto error;
> > > +    }
> >  You missed to init psz_output to NULL.
>  I saw you fixed it in d932926590aac6d22bc906498461c9c8e3148a24.
>  But then you forgot to remove the useless initialization
> before "goto error".
 To answer myself, they are needed, asprintf leaves them undefined in case
of failure.

-- 
fenrir



More information about the vlc-devel mailing list