Make sure variables are never used uninitialized.

From: Erik Hovland <erik@hovland.org>


---

 mythtv/libs/libmythtv/util-vdpau.cpp |   35 +++++++++++++++++++++++++++++++---
 1 files changed, 32 insertions(+), 3 deletions(-)


diff --git a/mythtv/libs/libmythtv/util-vdpau.cpp b/mythtv/libs/libmythtv/util-vdpau.cpp
index 5280447..fd6179f 100644
--- a/mythtv/libs/libmythtv/util-vdpau.cpp
+++ b/mythtv/libs/libmythtv/util-vdpau.cpp
@@ -57,8 +57,37 @@ VDPAUContext::VDPAUContext()
     pipVideoSurface(0),     pipOutputSurface(0),
     pipVideoMixer(0),       pipReady(0),       pipAlpha(0),
     vdp_flip_target(NULL),  vdp_flip_queue(NULL),
-    vdp_device(NULL),       errored(false)
+    vdp_device(NULL),       errored(false),
+    vdp_get_proc_address(NULL), vdp_device_destroy(NULL), vdp_get_error_string(NULL),
+    vdp_get_api_version(NULL), vdp_get_information_string(NULL),
+    vdp_video_surface_create(NULL), vdp_video_surface_destroy(NULL),
+    vdp_video_surface_put_bits_y_cb_cr(NULL), vdp_video_surface_get_bits_y_cb_cr(NULL),
+    vdp_video_surface_query_get_put_bits_y_cb_cr_capabilities(NULL),
+    vdp_video_surface_query_capabilities(NULL), vdp_output_surface_put_bits_y_cb_cr(NULL),
+    vdp_output_surface_put_bits_native(NULL), vdp_output_surface_create(NULL),
+    vdp_output_surface_destroy(NULL), vdp_output_surface_render_bitmap_surface(NULL),
+    vdp_output_surface_query_capabilities(NULL),
+    vdp_video_mixer_create(NULL), vdp_video_mixer_set_feature_enables(NULL),
+    vdp_video_mixer_destroy(NULL), vdp_video_mixer_render(NULL),
+    vdp_video_mixer_set_attribute_values(NULL), vdp_video_mixer_query_feature_support(NULL),
+    vdp_video_mixer_query_attribute_support(NULL), vdp_video_mixer_query_parameter_support(NULL),
+    vdp_generate_csc_matrix(NULL),
+    vdp_presentation_queue_target_destroy(NULL), vdp_presentation_queue_create(NULL),
+    vdp_presentation_queue_destroy(NULL), vdp_presentation_queue_display(NULL),
+    vdp_presentation_queue_block_until_surface_idle(NULL), vdp_presentation_queue_target_create_x11(NULL),
+    vdp_presentation_queue_query_surface_status(NULL),
+    vdp_decoder_create(NULL), vdp_decoder_destroy(NULL), vdp_decoder_render(NULL), 
+    vdp_bitmap_surface_create(NULL), vdp_bitmap_surface_destroy(NULL),
+    vdp_bitmap_surface_put_bits_native(NULL), vdp_bitmap_surface_query_capabilities(NULL)
 {
+    memset(outputSurfaces, 0, sizeof(outputSurfaces));
+    memset(&outRect, 0, sizeof(outRect));
+    memset(&outRectVid, 0, sizeof(outRectVid));
+    memset(&osdLayer, 0, sizeof(osdLayer));
+    memset(&osdRect, 0, sizeof(osdRect));
+    memset(&proCamp, 0, sizeof(proCamp));
+    memset(&pipLayer, 0, sizeof(pipLayer));
+    memset(&pipPosition, 0, sizeof(pipPosition));
 }
 
 VDPAUContext::~VDPAUContext()
@@ -1390,7 +1419,7 @@ bool VDPAUContext::CheckCodecSupported(MythCodecID myth_codec_id)
     if (!screen)
         ok = false;
 
-    VdpDevice device;
+    VdpDevice device = 0;
     VdpGetProcAddress * vdp_proc_address;
     VdpStatus vdp_st;
     VdpGetErrorString * vdp_get_error_string;
@@ -1408,7 +1437,7 @@ bool VDPAUContext::CheckCodecSupported(MythCodecID myth_codec_id)
     }
 
     VdpDecoderQueryCapabilities * decoder_query;
-    VdpDeviceDestroy * device_destroy;
+    VdpDeviceDestroy * device_destroy = 0;
 
     if (ok)
     {
