rtpmux: Always let upstream chose the ssrc if it wishes

This commit is contained in:
Olivier Crête 2014-05-04 18:59:33 -04:00
parent 6c584bc833
commit 0742a5a257
2 changed files with 3 additions and 8 deletions

View file

@ -566,12 +566,7 @@ gst_rtp_mux_setcaps (GstPad * pad, GstRTPMux * rtp_mux, GstCaps * caps)
"setting caps %" GST_PTR_FORMAT " on src pad..", caps);
ret = gst_pad_set_caps (rtp_mux->srcpad, caps);
if (rtp_mux->ssrc == -1) {
if (gst_structure_has_field_typed (structure, "ssrc", G_TYPE_UINT)) {
rtp_mux->current_ssrc = g_value_get_uint
(gst_structure_get_value (structure, "ssrc"));
}
}
gst_structure_get_uint (structure, "ssrc", &rtp_mux->current_ssrc);
gst_caps_unref (caps);

View file

@ -226,7 +226,7 @@ basic_check_cb (GstPad * pad, int i)
fail_unless (buffers && g_list_length (buffers) == 1);
gst_rtp_buffer_map (buffers->data, GST_MAP_READ, &rtpbuffer);
fail_unless (gst_rtp_buffer_get_ssrc (&rtpbuffer) == 55);
fail_unless (gst_rtp_buffer_get_ssrc (&rtpbuffer) == 66);
fail_unless (gst_rtp_buffer_get_timestamp (&rtpbuffer) ==
200 - 57 + 1000 + i);
fail_unless (gst_rtp_buffer_get_seq (&rtpbuffer) == 100 + 1 + i);
@ -260,7 +260,7 @@ lock_check_cb (GstPad * pad, int i)
fail_unless (buffers && g_list_length (buffers) == 1);
gst_rtp_buffer_map (buffers->data, GST_MAP_READ, &rtpbuffer);
fail_unless (gst_rtp_buffer_get_ssrc (&rtpbuffer) == 55);
fail_unless (gst_rtp_buffer_get_ssrc (&rtpbuffer) == 66);
fail_unless (gst_rtp_buffer_get_timestamp (&rtpbuffer) ==
200 - 57 + 1000 + i);
fail_unless (gst_rtp_buffer_get_seq (&rtpbuffer) == 100 + 1 + i);