From be8c67909b4bb6bedf014706a53abef10ddb5a52 Mon Sep 17 00:00:00 2001 From: diego Date: Tue, 17 Feb 2009 11:16:19 +0000 Subject: Convert HAVE_MALLOC_H into a 0/1 definition, fixes the warning: mem.c:32:5: warning: "HAVE_MALLOC_H" is not defined git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28629 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 67f6b3e7e0..3f9241766d 100644 --- a/libmpcodecs/vd.c +++ b/libmpcodecs/vd.c @@ -6,7 +6,7 @@ #include "mp_msg.h" #include "help_mp.h" -#ifdef HAVE_MALLOC_H +#if HAVE_MALLOC_H #include #endif -- cgit v1.2.3 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