[MPlayer-cvslog] r28638 - trunk/libmpcodecs/vd.c

reimar subversion at mplayerhq.hu
Tue Feb 17 20:01:29 CET 2009


Author: reimar
Date: Tue Feb 17 20:01:29 2009
New Revision: 28638

Log:
Make it possible for mpcodecs_get_image to return NULL as the
documentation says it should instead of crashing.

Modified:
   trunk/libmpcodecs/vd.c

Modified: trunk/libmpcodecs/vd.c
==============================================================================
--- trunk/libmpcodecs/vd.c	Tue Feb 17 19:59:47 2009	(r28637)
+++ trunk/libmpcodecs/vd.c	Tue Feb 17 20:01:29 2009	(r28638)
@@ -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;
 }
 



More information about the MPlayer-cvslog mailing list