summaryrefslogtreecommitdiffstats
path: root/libmpcodecs
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-02-18 07:52:17 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-02-18 07:52:17 +0000
commit0248741426b6a1f2079cc4ae4b70916412fb1e23 (patch)
tree7397bca62d07425736a1aa77b667777ee85774c5 /libmpcodecs
parentf55bc9413c040c5985a0d0e51da18133bfe3c286 (diff)
downloadmpv-0248741426b6a1f2079cc4ae4b70916412fb1e23.tar.bz2
mpv-0248741426b6a1f2079cc4ae4b70916412fb1e23.tar.xz
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
Diffstat (limited to 'libmpcodecs')
-rw-r--r--libmpcodecs/vd_ffmpeg.c1
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 &&