Mercurial > mplayer.hg
changeset 28603:679f41ece616
Make it possible for mpcodecs_get_image to return NULL as the
documentation says it should instead of crashing.
author | reimar |
---|---|
date | Tue, 17 Feb 2009 19:01:29 +0000 |
parents | 4cc1fbdaad5f |
children | 011bd477ee51 |
files | libmpcodecs/vd.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpcodecs/vd.c Tue Feb 17 18:59:47 2009 +0000 +++ b/libmpcodecs/vd.c Tue Feb 17 19:01:29 2009 +0000 @@ -341,7 +341,7 @@ // 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; }