From 0248741426b6a1f2079cc4ae4b70916412fb1e23 Mon Sep 17 00:00:00 2001 From: reimar Date: Wed, 18 Feb 2009 07:52:17 +0000 Subject: 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 --- libmpcodecs/vd_ffmpeg.c | 1 + 1 file changed, 1 insertion(+) 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 && -- cgit v1.2.3