diff libmpcodecs/vd_ffmpeg.c @ 28608:7a759aa746b6

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.).
author reimar
date Wed, 18 Feb 2009 07:52:17 +0000
parents 88bb92d3c5b4
children c327b2e9b259
line wrap: on
line diff
--- a/libmpcodecs/vd_ffmpeg.c	Wed Feb 18 02:04:16 2009 +0000
+++ b/libmpcodecs/vd_ffmpeg.c	Wed Feb 18 07:52:17 2009 +0000
@@ -576,6 +576,7 @@
 
     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 &&