[vlc-devel] commit: Fixed a potential infinite loop with libmpeg2. (Laurent Aimar )
git version control
git at videolan.org
Sun Sep 7 23:20:00 CEST 2008
vlc | branch: 0.9-bugfix | Laurent Aimar <fenrir at videolan.org> | Sun Sep 7 23:14:43 2008 +0200| [2d6c222bcd92b69b01ccc7bc600c2458959d242d] | committer: Laurent Aimar
Fixed a potential infinite loop with libmpeg2.
(cherry picked from commit 0ec4e51a3aff2a089bddb04121af12bbacf515fc)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2d6c222bcd92b69b01ccc7bc600c2458959d242d
---
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 f0e3833..149ae58 100644
--- a/modules/codec/libmpeg2.c
+++ b/modules/codec/libmpeg2.c
@@ -235,7 +235,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