From 021cb2c3870b9d0b2f2e03416702fc561f160c2b Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 25 Apr 2016 11:28:49 +0200 Subject: mp_image: allow passing NULL to mp_image_new_custom_ref() A minor simplification. Most callers don't need this, and there's no good reason why the caller should provide an "initializer" like this. (This function calls mp_image_new_dummy_ref(), which has no reason for an initializer either.) --- video/vdpau.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'video/vdpau.c') diff --git a/video/vdpau.c b/video/vdpau.c index 9dfbc2bc6e..6398fa6e58 100644 --- a/video/vdpau.c +++ b/video/vdpau.c @@ -268,8 +268,7 @@ static struct mp_image *create_ref(struct mp_vdpau_ctx *ctx, int index) struct surface_ref *ref = talloc_ptrtype(NULL, ref); *ref = (struct surface_ref){ctx, index}; struct mp_image *res = - mp_image_new_custom_ref(&(struct mp_image){0}, ref, - release_decoder_surface); + mp_image_new_custom_ref(NULL, ref, release_decoder_surface); if (res) { mp_image_setfmt(res, e->rgb ? IMGFMT_VDPAU_OUTPUT : IMGFMT_VDPAU); mp_image_set_size(res, e->w, e->h); -- cgit v1.2.3