[vlc-devel] [PATCH 1/3] decoder: process the last block when closing

Rafaël Carré rafael.carre at gmail.com
Tue Jul 19 15:24:59 CEST 2011


Le Tue, 19 Jul 2011 08:27:01 +0200,
Rémi Denis-Courmont <remi at remlab.net> a écrit :

> > diff --git a/src/input/es_out_timeshift.c
> > b/src/input/es_out_timeshift.c index d2d9b43..2930736 100644
> > --- a/src/input/es_out_timeshift.c
> > +++ b/src/input/es_out_timeshift.c
> > @@ -1269,12 +1269,11 @@ static int CmdExecuteSend( es_out_t *p_out,
> > ts_cmd_t *p_cmd )
> >  
> >      p_cmd->u.send.p_block = NULL;
> >  
> > +    if( p_cmd->u.send.p_es->p_es )
> > +        return es_out_Send( p_out, p_cmd->u.send.p_es->p_es,
> > p_block ); if( p_block )
> > -    {
> > -        if( p_cmd->u.send.p_es->p_es )
> > -            return es_out_Send( p_out, p_cmd->u.send.p_es->p_es,
> p_block
> > );
> >          block_Release( p_block );
> > -    }
> > +
> 
> Uh? I don't get this chunk.
> 
>

This is git diff -w (easier to read IMO):
call es_out_Send() regardless of p_block NULLity, but release p_block
only if it's non NULL

 
     p_cmd->u.send.p_block = NULL;
 
-    if( p_block )
-    {
         if( p_cmd->u.send.p_es->p_es )
             return es_out_Send( p_out, p_cmd->u.send.p_es->p_es,
p_block );
+    if( p_block )
         block_Release( p_block );
-    }
+
     return VLC_EGENERIC;
 }
 static void CmdCleanSend( ts_cmd_t *p_cmd )



-- 
Rafaël Carré



More information about the vlc-devel mailing list