[farsight2/master] Add check for invalid codec on src-pad-added signal

Olivier Crête olivier.crete at collabora.co.uk
Tue Dec 23 15:22:45 PST 2008


---
 tests/check/main/rtpconference.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/tests/check/main/rtpconference.c b/tests/check/main/rtpconference.c
index 90d933f..0f555b5 100644
--- a/tests/check/main/rtpconference.c
+++ b/tests/check/main/rtpconference.c
@@ -392,7 +392,7 @@ _handoff_handler (GstElement *element, GstBuffer *buffer, GstPad *pad,
         fs_codec_are_equal (
             g_list_last (negotiated_codecs)->data,
             g_object_get_data (G_OBJECT (element), "codec")),
-        "The handoff handler got a buffer from the wrong codec");
+        "The handoff handler got a buffer from the wrong codec (last)");
   else
     ts_fail_unless (
         fs_codec_are_equal (
@@ -486,6 +486,9 @@ _src_pad_added (FsStream *self, GstPad *pad, FsCodec *codec, gpointer user_data)
       "async", TRUE,
       NULL);
 
+  ts_fail_if (codec->encoding_name == NULL,
+      "Got invalid codec without an encoding_name");,
+
   g_object_set_data (G_OBJECT (fakesink), "codec", codeccopy);
   g_object_weak_ref (G_OBJECT (fakesink),
       (GWeakNotify) fs_codec_destroy, codeccopy);
-- 
1.5.6.5




More information about the farsight-commits mailing list