[gstreamermm] Use g_new() instead of new where C and C++ API might mix
- From: José Alburquerque <jaalburqu src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gstreamermm] Use g_new() instead of new where C and C++ API might mix
- Date: Wed, 25 Nov 2009 19:59:14 +0000 (UTC)
commit 2ddd4418dce1229f1b71423e75a1cacac413776d
Author: José Alburquerque <jaalburqu svn gnome org>
Date: Wed Nov 25 14:57:21 2009 -0500
Use g_new() instead of new where C and C++ API might mix
* gstreamer/src/mixer.ccg (get_volume): Use g_new() instead of new to
allocate array of volumes to allow successful debugging with libcwd.
* configure.ac: Typo.
ChangeLog | 8 ++++++++
configure.ac | 3 ++-
gstreamer/src/mixer.ccg | 2 +-
3 files changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 8ccc2f4..f82a949 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2009-11-25 José Alburquerque <jaalburqu svn gnome org>
+
+ Use g_new() instead of new where C and C++ API might mix
+
+ * gstreamer/src/mixer.ccg (get_volume): Use g_new() instead of new to
+ allocate array of volumes to allow successful debugging with libcwd.
+ * configure.ac: Typo.
+
2009-11-19 José Alburquerque <jaalburqu svn gnome org>
Added a comment to a TODO.
diff --git a/configure.ac b/configure.ac
index 8cf3530..478d391 100644
--- a/configure.ac
+++ b/configure.ac
@@ -140,7 +140,8 @@ vorbisenc=VorbisEnc \
vorbisparse=VorbisParse \
vorbistag=VorbisTag \
ximagesink=XImageSink \
-xvimagesink=XvImageSink"])
+xvimagesink=XvImageSink
+"])
# Check for the existence of the plug-ins. Note that this check doesn't
# work when cross-compiling. That isn't much of a problem though since
diff --git a/gstreamer/src/mixer.ccg b/gstreamer/src/mixer.ccg
index b974a34..51ab354 100644
--- a/gstreamer/src/mixer.ccg
+++ b/gstreamer/src/mixer.ccg
@@ -196,7 +196,7 @@ MessageMixerChanged::MessageMixerChanged(GstMessage* castitem)
Glib::ArrayHandle<int> Mixer::get_volume(const Glib::RefPtr<const Gst::MixerTrack>& track) const
{
const guint32 num_channels = track->get_num_channels();
- int* volumes = new int[num_channels];
+ int* volumes = g_new(int, num_channels);
gst_mixer_get_volume(const_cast<GstMixer*>(gobj()),
const_cast<GstMixerTrack*>(Glib::unwrap(track)), volumes);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]