[vlc-commits] codec: faad: fully drop padding (fix #2368)
Francois Cartegnie
git at videolan.org
Thu Feb 23 14:33:11 CET 2017
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Feb 23 14:27:58 2017 +0100| [aa395b66a114cc2cb511d4b8304412c36189dec2] | committer: Francois Cartegnie
codec: faad: fully drop padding (fix #2368)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=aa395b66a114cc2cb511d4b8304412c36189dec2
---
modules/codec/faad.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/modules/codec/faad.c b/modules/codec/faad.c
index 9cd1c8b..c0d27ee 100644
--- a/modules/codec/faad.c
+++ b/modules/codec/faad.c
@@ -218,8 +218,9 @@ static void FlushBuffer( decoder_sys_t *p_sys, size_t i_used )
if( i_used < p_block->i_buffer )
{
/* Drop padding */
- if( p_block->p_buffer[i_used] == 0x00 )
- i_used++;
+ for( ; i_used < p_block->i_buffer; i_used++ )
+ if( p_block->p_buffer[i_used] != 0x00 )
+ break;
p_block->i_buffer -= i_used;
p_block->p_buffer += i_used;
More information about the vlc-commits
mailing list