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:
Aleix Conchillo Flaqué 2014-04-02 12:59:58 -07:00 committed by Wim Taymans
parent 78acb90a80
commit 01c15547d4

View file

@ -149,8 +149,10 @@ rtcp_buffer_get_ssrc (GstBuffer * buf, guint32 * ssrc)
return FALSE;
if (gst_rtcp_buffer_get_first_packet (&rtcpbuf, &packet)) {
GstRTCPType type;
do {
switch (gst_rtcp_packet_get_type (&packet)) {
type = gst_rtcp_packet_get_type (&packet);
switch (type) {
case GST_RTCP_TYPE_RR:
*ssrc = gst_rtcp_packet_rr_get_ssrc (&packet);
ret = TRUE;
@ -163,7 +165,8 @@ rtcp_buffer_get_ssrc (GstBuffer * buf, guint32 * ssrc)
default:
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);