tests/webrtc: only check audio/video for direction attributes

This commit is contained in:
Matthew Waters 2018-12-04 20:32:56 +11:00
parent 033e55695f
commit b48e2947bf

View file

@ -805,6 +805,9 @@ on_sdp_media_direction (struct test_webrtc *t, GstElement * element,
for (i = 0; i < gst_sdp_message_medias_len (desc->sdp); i++) { for (i = 0; i < gst_sdp_message_medias_len (desc->sdp); i++) {
const GstSDPMedia *media = gst_sdp_message_get_media (desc->sdp, i); const GstSDPMedia *media = gst_sdp_message_get_media (desc->sdp, i);
if (g_strcmp0 (gst_sdp_media_get_media (media), "audio") == 0
|| g_strcmp0 (gst_sdp_media_get_media (media), "video") == 0) {
gboolean have_direction = FALSE; gboolean have_direction = FALSE;
int j; int j;
@ -835,6 +838,7 @@ on_sdp_media_direction (struct test_webrtc *t, GstElement * element,
} }
fail_unless (have_direction, "no direction attribute in media %u", j); fail_unless (have_direction, "no direction attribute in media %u", j);
} }
}
} }
GST_START_TEST (test_media_direction) GST_START_TEST (test_media_direction)