check: add some more checks
authorWim Taymans <wtaymans@redhat.com>
Tue, 4 Feb 2014 13:31:29 +0000 (14:31 +0100)
committerWim Taymans <wtaymans@redhat.com>
Tue, 4 Feb 2014 13:32:48 +0000 (14:32 +0100)
Add header and payload length check in case of CSRCs.

See https://bugzilla.gnome.org/show_bug.cgi?id=723196

tests/check/libs/rtp.c

index 601200d..6f8a3b3 100644 (file)
@@ -131,6 +131,9 @@ GST_START_TEST (test_rtp_buffer)
   fail_unless_equals_int (gst_rtp_buffer_get_csrc (&rtp, 0), 0);
   fail_unless_equals_int (gst_rtp_buffer_get_csrc (&rtp, 1), 0);
   fail_unless_equals_int (gst_rtp_buffer_get_csrc (&rtp, 2), 0);
+  fail_unless_equals_int (gst_rtp_buffer_get_header_len (&rtp),
+      RTP_HEADER_LEN + 4 * 3);
+  fail_unless_equals_int (gst_rtp_buffer_get_payload_len (&rtp), 16);
 
   data += RTP_HEADER_LEN;       /* skip the other header stuff */
   gst_rtp_buffer_set_csrc (&rtp, 0, 0xf7c0);