[vlc-commits] Revert "lpcm: validate block_nb_frames in DVD/LPCM cases"

Francois Cartegnie git at videolan.org
Wed Mar 22 16:34:40 CET 2017


vlc/vlc-2.2 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Mar 22 16:16:25 2017 +0100| [7e934fea2f0c2c0017399075f5d7a31651b9bcbd] | committer: Francois Cartegnie

Revert "lpcm: validate block_nb_frames in DVD/LPCM cases"

This reverts commit d75cb6ebc89f89f91ee940c55fc8345aa1f7a35d.

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=7e934fea2f0c2c0017399075f5d7a31651b9bcbd
---

 modules/codec/lpcm.c | 14 --------------
 1 file changed, 14 deletions(-)

diff --git a/modules/codec/lpcm.c b/modules/codec/lpcm.c
index d158ad3..e040133 100644
--- a/modules/codec/lpcm.c
+++ b/modules/codec/lpcm.c
@@ -434,20 +434,6 @@ static block_t *DecodeFrame( decoder_t *p_dec, block_t **pp_block )
         p_block->p_buffer += p_sys->i_header_size + i_padding;
         p_block->i_buffer -= p_sys->i_header_size + i_padding;
 
-        const unsigned block_nb_frames = p_block->i_buffer / ( i_bits * 4 / 8 );
-        const unsigned aout_nb_frames = p_aout_buffer->i_nb_samples
-            / ( p_dec->fmt_out.audio.i_bitspersample / 8 );
-
-        if( block_nb_frames > aout_nb_frames )
-        {
-            msg_Warn( p_dec, "invalid block size" );
-
-            block_Release( p_block );
-            block_Release( p_aout_buffer );
-
-            return NULL;
-        }
-
         switch( p_sys->i_type )
         {
         case LPCM_WIDI:



More information about the vlc-commits mailing list