mirror of
https://github.com/mpv-player/mpv
synced 2025-04-01 14:50:07 +00:00
fixed mem corruption bugs
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@10251 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
061b3e1db4
commit
2f2918587f
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user