From 9661b77ea1176ef1b5b80b0a0bb81937074a5ffd Mon Sep 17 00:00:00 2001 From: Carl-Anton Ingmarsson Date: Wed, 1 Jul 2009 00:13:14 +0200 Subject: [PATCH] vdpau: use G_N_ELEMENTS instead of NULL terminating array --- sys/vdpau/gstvdpdevice.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/vdpau/gstvdpdevice.c b/sys/vdpau/gstvdpdevice.c index 26ed2659d3..9c8b713c7b 100644 --- a/sys/vdpau/gstvdpdevice.c +++ b/sys/vdpau/gstvdpdevice.c @@ -117,8 +117,7 @@ gst_vdp_device_constructed (GObject * object) {VDP_FUNC_ID_PRESENTATION_QUEUE_BLOCK_UNTIL_SURFACE_IDLE, &device->vdp_presentation_queue_block_until_surface_idle}, {VDP_FUNC_ID_PRESENTATION_QUEUE_SET_BACKGROUND_COLOR, - &device->vdp_presentation_queue_set_background_color}, - {0, NULL} + &device->vdp_presentation_queue_set_background_color} }; device->display = XOpenDisplay (device->display_name); @@ -148,7 +147,7 @@ gst_vdp_device_constructed (GObject * object) goto error; } - for (i = 0; vdp_function[i].func != NULL; i++) { + for (i = 0; i < G_N_ELEMENTS (vdp_function); i++) { status = device->vdp_get_proc_address (device->device, vdp_function[i].id, vdp_function[i].func);