[farsight2/master] Don't crash on null encoding-name (seems like jingle allows that)
Olivier Crête
olivier.crete at collabora.co.uk
Tue Dec 23 15:22:12 PST 2008
---
gst-libs/gst/farsight/fs-codec.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/gst-libs/gst/farsight/fs-codec.c b/gst-libs/gst/farsight/fs-codec.c
index e51e7c3..3298688 100644
--- a/gst-libs/gst/farsight/fs-codec.c
+++ b/gst-libs/gst/farsight/fs-codec.c
@@ -109,8 +109,7 @@ fs_codec_new (int id, const char *encoding_name,
void
fs_codec_destroy (FsCodec * codec)
{
- if (codec->encoding_name)
- g_free (codec->encoding_name);
+ g_free (codec->encoding_name);
if (codec->optional_params) {
GList *lp;
FsCodecParameter *optional_param;
@@ -509,7 +508,7 @@ fs_codec_are_equal (const FsCodec *codec1, const FsCodec *codec2)
codec1->media_type != codec2->media_type ||
codec1->clock_rate != codec2->clock_rate ||
codec1->channels != codec2->channels ||
- strcmp (codec1->encoding_name, codec2->encoding_name))
+ g_strcmp0 (codec1->encoding_name, codec2->encoding_name))
return FALSE;
--
1.5.6.5
More information about the farsight-commits
mailing list