summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-04-25 11:30:07 +0200
committerwm4 <wm4@nowhere>2016-04-25 11:30:07 +0200
commit85416bc36ac53424e6884c305e5ab1a6f875562d (patch)
tree4af6729568f16863e1066462a533934f3b9a34da
parent021cb2c3870b9d0b2f2e03416702fc561f160c2b (diff)
downloadmpv-85416bc36ac53424e6884c305e5ab1a6f875562d.tar.bz2
mpv-85416bc36ac53424e6884c305e5ab1a6f875562d.tar.xz
vd_lavc: allow process_image() to return NULL
In case of errors or whatever.
-rw-r--r--video/decode/vd_lavc.c2
1 files changed, 1 insertions, 1 deletions
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,