From a6e33b4290600ed89f241632a6417b9d87485352 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 14 Aug 2015 13:19:17 +0200 Subject: vo_rpi: fix NULL pointer deref Can happen in obscure situations and with hw decoding disabled. --- video/out/vo_rpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'video') diff --git a/video/out/vo_rpi.c b/video/out/vo_rpi.c index f49f9a409b..615a5a8997 100644 --- a/video/out/vo_rpi.c +++ b/video/out/vo_rpi.c @@ -380,7 +380,7 @@ static void draw_frame(struct vo *vo, struct vo_frame *frame) p->display_synced = frame->display_synced; - if (vo->params->imgfmt != IMGFMT_MMAL) { + if (mpi && mpi->imgfmt != IMGFMT_MMAL) { MMAL_BUFFER_HEADER_T *buffer = mmal_queue_wait(p->swpool->queue); if (!buffer) { talloc_free(mpi); -- cgit v1.2.3