[vlc-commits] decoder: remove legacy flush call

Thomas Guillem git at videolan.org
Sat Dec 5 12:55:11 CET 2015


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Thu Dec  3 18:14:04 2015 +0100| [8c4fff2f85e7916f2e18abf00605e7302bfba5f6] | committer: Thomas Guillem

decoder: remove legacy flush call

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8c4fff2f85e7916f2e18abf00605e7302bfba5f6
---

 src/input/decoder.c |   24 ------------------------
 1 file changed, 24 deletions(-)

diff --git a/src/input/decoder.c b/src/input/decoder.c
index c4fb6a1..55d7abb 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -210,19 +210,6 @@ static void DecoderUpdateFormatLocked( decoder_t *p_dec )
     p_owner->b_fmt_description = true;
 }
 
-static block_t *DecoderBlockFlushNew()
-{
-    block_t *p_null = block_Alloc( 128 );
-    if( !p_null )
-        return NULL;
-
-    p_null->i_flags |= BLOCK_FLAG_DISCONTINUITY |
-                       BLOCK_FLAG_CORRUPTED;
-    memset( p_null->p_buffer, 0, p_null->i_buffer );
-
-    return p_null;
-}
-
 /*****************************************************************************
  * Buffers allocation callbacks for the decoders
  *****************************************************************************/
@@ -1280,17 +1267,6 @@ static void DecoderProcessFlush( decoder_t *p_dec )
 
     if ( p_dec->pf_flush != NULL )
         p_dec->pf_flush( p_dec );
-    else
-    {
-        /* legacy call, pass a CORRUPTED + DISCONTINUITY block */
-        block_t *p_flush = DecoderBlockFlushNew();
-        if( unlikely( p_flush == NULL ) )
-        {
-            msg_Err( p_dec, "cannot flush" );
-            return;
-        }
-        DecoderProcess( p_dec, p_flush );
-    }
 
     if( p_dec->fmt_out.i_cat == AUDIO_ES )
     {



More information about the vlc-commits mailing list