changeset 6234:af0b011c9440

setting mpi's w/h to disp_w/h. it fixes mpeg1 crash when height%16!=0
author arpi
date Thu, 30 May 2002 01:26:07 +0000
parents e2f1b1b8f8b4
children 3fbaae881e40
files libmpcodecs/vd.c
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/vd.c	Thu May 30 00:40:55 2002 +0000
+++ b/libmpcodecs/vd.c	Thu May 30 01:26:07 2002 +0000
@@ -260,6 +260,10 @@
 // returns NULL or allocated mp_image_t*
 // Note: buffer allocation may be moved to mpcodecs_config_vo() later...
 mp_image_t* mpcodecs_get_image(sh_video_t *sh, int mp_imgtype, int mp_imgflag, int w, int h){
-  return vf_get_image(sh->vfilter,sh->codec->outfmt[sh->outfmtidx],mp_imgtype,mp_imgflag,w,h);
+  mp_image_t* mpi=vf_get_image(sh->vfilter,sh->codec->outfmt[sh->outfmtidx],mp_imgtype,mp_imgflag,w,h);
+  mpi->x=mpi->y=0;
+  mpi->w=sh->disp_w;
+  mpi->h=sh->disp_h;
+  return mpi;
 }