changeset 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 cd63458d940f
children bc0b1cf2c94e
files libmpcodecs/vd_ffmpeg.c
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
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 &&