mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-23 15:48:23 +00:00
srtpdec: fix assertion checking ssrc from rtcp packets
rtcp_buffer_get_ssrc is called even with RTP buffers. this means we might end up with an exception and not find any valid RTCP packet type and thus hit GST_RTCP_TYPE_INVALID. we now take care of this. https://bugzilla.gnome.org/show_bug.cgi?id=727512
This commit is contained in:
parent
78acb90a80
commit
01c15547d4
1 changed files with 5 additions and 2 deletions
|
@ -149,8 +149,10 @@ rtcp_buffer_get_ssrc (GstBuffer * buf, guint32 * ssrc)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
if (gst_rtcp_buffer_get_first_packet (&rtcpbuf, &packet)) {
|
if (gst_rtcp_buffer_get_first_packet (&rtcpbuf, &packet)) {
|
||||||
|
GstRTCPType type;
|
||||||
do {
|
do {
|
||||||
switch (gst_rtcp_packet_get_type (&packet)) {
|
type = gst_rtcp_packet_get_type (&packet);
|
||||||
|
switch (type) {
|
||||||
case GST_RTCP_TYPE_RR:
|
case GST_RTCP_TYPE_RR:
|
||||||
*ssrc = gst_rtcp_packet_rr_get_ssrc (&packet);
|
*ssrc = gst_rtcp_packet_rr_get_ssrc (&packet);
|
||||||
ret = TRUE;
|
ret = TRUE;
|
||||||
|
@ -163,7 +165,8 @@ rtcp_buffer_get_ssrc (GstBuffer * buf, guint32 * ssrc)
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} while (gst_rtcp_packet_move_to_next (&packet) && ret == FALSE);
|
} while ((ret == FALSE) && (type != GST_RTCP_TYPE_INVALID) &&
|
||||||
|
gst_rtcp_packet_move_to_next (&packet));
|
||||||
}
|
}
|
||||||
|
|
||||||
gst_rtcp_buffer_unmap (&rtcpbuf);
|
gst_rtcp_buffer_unmap (&rtcpbuf);
|
||||||
|
|
Loading…
Reference in a new issue