diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2009-02-18 07:52:17 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2009-02-18 07:52:17 +0000 |
commit | 0248741426b6a1f2079cc4ae4b70916412fb1e23 (patch) | |
tree | 7397bca62d07425736a1aa77b667777ee85774c5 | |
parent | f55bc9413c040c5985a0d0e51da18133bfe3c286 (diff) |
Handle mpcodecs_get_image returning NULL, FFmpeg most of the time handles
it correctly (VDPAU and probably H.264 currently don't, MPEG1/2 does etc.).
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28643 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | libmpcodecs/vd_ffmpeg.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libmpcodecs/vd_ffmpeg.c b/libmpcodecs/vd_ffmpeg.c index d8a7060434..9a0b9482d6 100644 --- a/libmpcodecs/vd_ffmpeg.c +++ b/libmpcodecs/vd_ffmpeg.c @@ -576,6 +576,7 @@ static int get_buffer(AVCodecContext *avctx, AVFrame *pic){ mpi= mpcodecs_get_image(sh, type, flags, (width+align)&(~align), (height+align)&(~align)); + if (!mpi) return -1; // ok, let's see what did we get: if(mpi->flags&MP_IMGFLAG_DRAW_CALLBACK && |