aboutsummaryrefslogtreecommitdiffhomepage
path: root/libmpcodecs
diff options
context:
space:
mode:
authorGravatar arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-06-06 19:12:08 +0000
committerGravatar arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-06-06 19:12:08 +0000
commit2f2918587f584190543d4f77759368907834822c (patch)
tree8b5f669d40d453cf63aca47cf6746ec959d50f8c /libmpcodecs
parent061b3e1db403f58e6d0101383b0a933d1fc9438b (diff)
fixed mem corruption bugs
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@10251 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs')
-rw-r--r--libmpcodecs/vd_libmpeg2.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libmpcodecs/vd_libmpeg2.c b/libmpcodecs/vd_libmpeg2.c
index 663ff43283..ff150bfaa6 100644
--- a/libmpcodecs/vd_libmpeg2.c
+++ b/libmpcodecs/vd_libmpeg2.c
@@ -137,15 +137,15 @@ static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags){
(info->current_picture->flags&PIC_FLAG_PROGRESSIVE_FRAME)) ?
MP_IMGFLAG_DRAW_CALLBACK:0)
: (MP_IMGFLAG_PRESERVE|MP_IMGFLAG_READABLE),
- (info->sequence->picture_width+7)&(~7),
- (info->sequence->picture_height+7)&(~7) );
+ (info->sequence->picture_width+15)&(~15),
+ (info->sequence->picture_height+15)&(~15) );
if(!mpi) return 0; // VO ERROR!!!!!!!!
mpeg2_set_buf(mpeg2dec, mpi->planes, mpi);
#ifdef MPEG12_POSTPROC
if(!mpi->qscale){
- mpi->qstride=info->sequence->picture_width>>4;
- mpi->qscale=malloc(mpi->qstride*(info->sequence->picture_height>>4));
+ mpi->qstride=(info->sequence->picture_width+15)>>4;
+ mpi->qscale=malloc(mpi->qstride*((info->sequence->picture_height+15)>>4));
}
mpeg2dec->decoder.quant_store=mpi->qscale;
mpeg2dec->decoder.quant_stride=mpi->qstride;