[farsight2/master] Allocate CodecAssociations using GSlice
Olivier Crête
olivier.crete at collabora.co.uk
Tue Dec 23 15:22:31 PST 2008
---
gst/fsrtpconference/fs-rtp-codec-negotiation.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/gst/fsrtpconference/fs-rtp-codec-negotiation.c b/gst/fsrtpconference/fs-rtp-codec-negotiation.c
index 73653ea..012fa94 100644
--- a/gst/fsrtpconference/fs-rtp-codec-negotiation.c
+++ b/gst/fsrtpconference/fs-rtp-codec-negotiation.c
@@ -148,7 +148,7 @@ _codec_association_destroy (CodecAssociation *ca)
return;
fs_codec_destroy (ca->codec);
- g_free (ca);
+ g_slice_free (CodecAssociation, ca);
}
@@ -313,7 +313,7 @@ create_local_codec_associations (FsMediaType media_type,
continue;
}
- ca = g_new0 (CodecAssociation, 1);
+ ca = g_slice_new0 (CodecAssociation);
ca->blueprint = bp;
ca->codec = fs_codec_copy (codec_pref);
@@ -409,7 +409,7 @@ create_local_codec_associations (FsMediaType media_type,
continue;
}
- ca = g_new0 (CodecAssociation, 1);
+ ca = g_slice_new0 (CodecAssociation);
ca->blueprint = bp;
ca->codec = fs_codec_copy (bp->codec);
@@ -571,7 +571,7 @@ negotiate_codecs (const GList *remote_codecs,
}
if (nego_codec) {
- CodecAssociation *new_ca = g_new0 (CodecAssociation, 1);
+ CodecAssociation *new_ca = g_slice_new0 (CodecAssociation);
gchar *tmp;
new_ca->codec = nego_codec;
@@ -618,7 +618,7 @@ negotiate_codecs (const GList *remote_codecs,
*/
local_ca = lookup_codec_association_by_pt (local_codec_associations, i);
if (local_ca) {
- CodecAssociation *new_ca = g_new0 (CodecAssociation, 1);
+ CodecAssociation *new_ca = g_slice_new0 (CodecAssociation);
new_ca->codec = fs_codec_copy (local_ca->codec);
new_ca->blueprint = local_ca->blueprint;
--
1.5.6.5
More information about the farsight-commits
mailing list