From 209d6105d73bcdb01f20432035fc58436caa26b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole=20Andr=C3=A9=20Vadla=20Ravn=C3=A5s?= Date: Sun, 4 Nov 2007 11:04:28 +0000 Subject: gst-libs/gst/dshow/gstdshowfakesink.*: Fix crasher in constructor due to the base class's constructor not necessarily... MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Original commit message from CVS: Patch by: Ole André Vadla Ravnås * gst-libs/gst/dshow/gstdshowfakesink.cpp: (CDshowFakeSink.CDshowFakeSink): * gst-libs/gst/dshow/gstdshowfakesink.h: (CDshowFakeSink.m_hres): Fix crasher in constructor due to the base class's constructor not necessarily being NULL-safe (depends on the SDK version used apparently; #492406). * sys/dshowsrcwrapper/gstdshowaudiosrc.c: (gst_dshowaudiosrc_prepare): * sys/dshowsrcwrapper/gstdshowvideosrc.c: (gst_dshowvideosrc_set_caps): Fix a couple of MSVC compiler warnings (#492406). --- gst-libs/gst/dshow/gstdshowfakesink.cpp | 3 ++- gst-libs/gst/dshow/gstdshowfakesink.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'gst-libs') diff --git a/gst-libs/gst/dshow/gstdshowfakesink.cpp b/gst-libs/gst/dshow/gstdshowfakesink.cpp index 58b23718..e3a5f0b9 100644 --- a/gst-libs/gst/dshow/gstdshowfakesink.cpp +++ b/gst-libs/gst/dshow/gstdshowfakesink.cpp @@ -22,7 +22,8 @@ #include "gstdshowfakesink.h" -CDshowFakeSink::CDshowFakeSink():CBaseRenderer(CLSID_DshowFakeSink, "DshowFakeSink", NULL, NULL) +CDshowFakeSink::CDshowFakeSink() + : m_hres(S_OK), CBaseRenderer(CLSID_DshowFakeSink, "DshowFakeSink", NULL, &m_hres) { m_callback = NULL; } diff --git a/gst-libs/gst/dshow/gstdshowfakesink.h b/gst-libs/gst/dshow/gstdshowfakesink.h index b53a6898..7f419b27 100644 --- a/gst-libs/gst/dshow/gstdshowfakesink.h +++ b/gst-libs/gst/dshow/gstdshowfakesink.h @@ -43,6 +43,7 @@ public: STDMETHOD (gst_set_sample_size) (unsigned int size); protected: + HRESULT m_hres; CMediaType m_MediaType; push_buffer_func m_callback; byte *m_data; -- cgit v1.2.1