From 85416bc36ac53424e6884c305e5ab1a6f875562d Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 25 Apr 2016 11:30:07 +0200 Subject: vd_lavc: allow process_image() to return NULL In case of errors or whatever. --- video/decode/vd_lavc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/video/decode/vd_lavc.c b/video/decode/vd_lavc.c index 0bbe84c31b..8217c8b0d7 100644 --- a/video/decode/vd_lavc.c +++ b/video/decode/vd_lavc.c @@ -637,7 +637,7 @@ static struct mp_image *read_output(struct dec_video *vd) if (ctx->hwdec && ctx->hwdec->process_image) res = ctx->hwdec->process_image(ctx, res); - return mp_img_swap_to_native(res); + return res ? mp_img_swap_to_native(res) : NULL; } static void decode(struct dec_video *vd, struct demux_packet *packet, -- cgit v1.2.3