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

Rafaël Carré rafael.carre at gmail.com
Tue Jul 19 04:40:09 CEST 2011


Le Mon, 18 Jul 2011 22:26:04 -0400,
Rafaël Carré <rafael.carre at gmail.com> a écrit :

... should test before sending

> --- a/src/input/decoder.c
> +++ b/src/input/decoder.c
> @@ -922,13 +922,21 @@ static void *DecoderThread( void *p_data )
>      /* The decoder's main loop */
>      for( ;; )
>      {
> +        bool eos = false;
>          block_t *p_block = block_FifoGet( p_owner->p_fifo );
>  
>          /* Make sure there is no cancellation point other than this
> one^^.
>           * If you need one, be sure to push cleanup of p_block. */
>          DecoderSignalBuffering( p_dec, p_block == NULL );
>  
> -        if( p_block )
> +        if( p_block->i_flags & BLOCK_FLAG_EOS )

+        if( p_block && p_block->i_flags & BLOCK_FLAG_EOS )

> +        {
> +            eos = true;
> +            block_Release( p_block );
> +            p_block = NULL;
> +        }
> +
> +        if( p_block || eos )
>          {
>              int canc = vlc_savecancel();
>  

-- 
Rafaël Carré



More information about the vlc-devel mailing list