diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2009-02-17 19:01:29 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2009-02-17 19:01:29 +0000 |
commit | 4f9a9ae44f21fad6bdc8b9f27744ffd397de8963 (patch) | |
tree | 0ca932df0e20fa2ef1d25f597c70e634ed8f69e9 /libmpcodecs | |
parent | bdfef5ff392daf50ea5943608554b9c47e402b2a (diff) | |
download | mpv-4f9a9ae44f21fad6bdc8b9f27744ffd397de8963.tar.bz2 mpv-4f9a9ae44f21fad6bdc8b9f27744ffd397de8963.tar.xz |
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
Diffstat (limited to 'libmpcodecs')
-rw-r--r-- | libmpcodecs/vd.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; } |