[vlc-devel] commit: Fixed a potential infinite loop with libmpeg2. (Laurent Aimar )
git version control
git at videolan.org
Thu Oct 16 19:53:11 CEST 2008
vlc | branch: 0.8.6-bugfix | Laurent Aimar <fenrir at videolan.org> | Sun Sep 7 23:14:43 2008 +0200| [c105797baa0cd4c7c27369a19d45f4f333edb8ad] | committer: Rémi Denis-Courmont
Fixed a potential infinite loop with libmpeg2.
(cherry picked from commit 0ec4e51a3aff2a089bddb04121af12bbacf515fc)
Signed-off-by: Rémi Denis-Courmont <rdenis at simphalempin.com>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c105797baa0cd4c7c27369a19d45f4f333edb8ad
---
modules/codec/libmpeg2.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/modules/codec/libmpeg2.c b/modules/codec/libmpeg2.c
index df6eba1..96d05c9 100644
--- a/modules/codec/libmpeg2.c
+++ b/modules/codec/libmpeg2.c
@@ -241,7 +241,10 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
uint8_t *buf[3];
buf[0] = buf[1] = buf[2] = NULL;
if( (p_pic = GetNewPicture( p_dec, buf )) == NULL )
+ {
+ p_block->i_buffer = 0;
break;
+ }
mpeg2_set_buf( p_sys->p_mpeg2dec, buf, p_pic );
mpeg2_stride( p_sys->p_mpeg2dec, p_pic->p[Y_PLANE].i_pitch );
}
More information about the vlc-devel
mailing list