changeset 36354:c728ba2a3f70

Fix possible crash when mpi is NULL.
author reimar
date Thu, 19 Sep 2013 17:54:59 +0000
parents 46bc86e725af
children 4593e5141d8e
files libmpcodecs/vd_ffmpeg.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/vd_ffmpeg.c	Mon Sep 16 18:35:46 2013 +0000
+++ b/libmpcodecs/vd_ffmpeg.c	Thu Sep 19 17:54:59 2013 +0000
@@ -540,7 +540,7 @@
         return;
     }
 #if CONFIG_VDPAU
-    if (IMGFMT_IS_VDPAU(mpi->imgfmt)) {
+    if (mpi && IMGFMT_IS_VDPAU(mpi->imgfmt)) {
         struct vdpau_render_state *render = mpi->priv;
         vdpau_render_wrapper(s, src, &render->info, render->bitstream_buffers_used, render->bitstream_buffers);
         return;