diff options
author | henry <henry@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2004-12-01 09:32:48 +0000 |
---|---|---|
committer | henry <henry@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2004-12-01 09:32:48 +0000 |
commit | 0859bbe33a9cd9ccda4a1b2654d6942912f2bc17 (patch) | |
tree | acb41bef893ad418c7863fbd7ffe03951f28c714 /libmpcodecs | |
parent | 5caa6d592baf36c4cbbb66cce06195bc4ae60e5c (diff) | |
download | mpv-0859bbe33a9cd9ccda4a1b2654d6942912f2bc17.tar.bz2 mpv-0859bbe33a9cd9ccda4a1b2654d6942912f2bc17.tar.xz |
call draw_slice in top-down order (fixes crash with -vf expand=...,scale)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14075 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs')
-rw-r--r-- | libmpcodecs/vf_expand.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/libmpcodecs/vf_expand.c b/libmpcodecs/vf_expand.c index e4d722c5f8..9fef4a452d 100644 --- a/libmpcodecs/vf_expand.c +++ b/libmpcodecs/vf_expand.c @@ -257,7 +257,14 @@ static void start_slice(struct vf_instance_s* vf, mp_image_t *mpi){ static void draw_slice(struct vf_instance_s* vf, unsigned char** src, int* stride, int w,int h, int x, int y){ // printf("draw_slice() called %d at %d\n",h,y); + if(vf->priv->exp_y>0 && y == 0) + vf_next_draw_slice(vf, vf->dmpi->planes, vf->dmpi->stride, + vf->dmpi->w,vf->priv->exp_y,0,0); vf_next_draw_slice(vf,src,stride,w,h,x+vf->priv->exp_x,y+vf->priv->exp_y); + if(vf->priv->exp_y+vf->h<vf->dmpi->h && y+h == vf->h) + vf_next_draw_slice(vf, vf->dmpi->planes, vf->dmpi->stride, + vf->dmpi->w,vf->dmpi->h-(vf->priv->exp_y+vf->h), + 0,vf->priv->exp_y+vf->h); } static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){ @@ -265,15 +272,6 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi){ vf->dmpi=mpi->priv; if(!vf->dmpi) { printf("Why do we get NULL \n"); return 0; } mpi->priv=NULL; - if(mpi->flags&MP_IMGFLAG_DRAW_CALLBACK){ - if(vf->priv->exp_y>0) - vf_next_draw_slice(vf, vf->dmpi->planes, vf->dmpi->stride, - vf->dmpi->w,vf->priv->exp_y,0,0); - if(vf->priv->exp_y+mpi->h<vf->dmpi->h) - vf_next_draw_slice(vf, vf->dmpi->planes, vf->dmpi->stride, - vf->dmpi->w,vf->dmpi->h-(vf->priv->exp_y+mpi->h), - 0,vf->priv->exp_y+mpi->h); - } #ifdef OSD_SUPPORT if(vf->priv->osd) draw_osd(vf,mpi->w,mpi->h); #endif |