From 4f9a9ae44f21fad6bdc8b9f27744ffd397de8963 Mon Sep 17 00:00:00 2001 From: reimar Date: Tue, 17 Feb 2009 19:01:29 +0000 Subject: Make it possible for mpcodecs_get_image to return NULL as the documentation says it should instead of crashing. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28638 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpcodecs/vd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libmpcodecs/vd.c') diff --git a/libmpcodecs/vd.c b/libmpcodecs/vd.c index 3f9241766d..4ebb01e179 100644 --- a/libmpcodecs/vd.c +++ b/libmpcodecs/vd.c @@ -341,7 +341,7 @@ csp_again: // 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){ 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; + if (mpi) mpi->x=mpi->y=0; return mpi; } -- cgit v1.2.3