summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Crete <tester at tester.ca>2009-04-17 10:53:10 +0200
committerWim Taymans <wim@metal.(none)>2009-04-17 10:53:10 +0200
commitd927114ef85f41526cf749b6d3e08f5869c4c39b (patch)
tree3965fd7366139c00e9c5219a7463d65083754535
parentf83f57b6486dca3582c9754b1d31dbc1dfb3d4b1 (diff)
RTCP: don't fail when retrieving invalid PT
We can't meaningfully assert on valid packet types so just return the type as it is. Update the comments to reflect this. Fixes #579192.
-rw-r--r--gst-libs/gst/rtp/gstrtcpbuffer.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gst-libs/gst/rtp/gstrtcpbuffer.c b/gst-libs/gst/rtp/gstrtcpbuffer.c
index 602ab6505..1cb4e0658 100644
--- a/gst-libs/gst/rtp/gstrtcpbuffer.c
+++ b/gst-libs/gst/rtp/gstrtcpbuffer.c
@@ -544,14 +544,13 @@ gst_rtcp_packet_get_padding (GstRTCPPacket * packet)
*
* Get the packet type of the packet pointed to by @packet.
*
- * Returns: The packet type.
+ * Returns: The packet type or GST_RTCP_TYPE_INVALID when @packet is not
+ * pointing to a valid packet.
*/
GstRTCPType
gst_rtcp_packet_get_type (GstRTCPPacket * packet)
{
g_return_val_if_fail (packet != NULL, GST_RTCP_TYPE_INVALID);
- g_return_val_if_fail (packet->type != GST_RTCP_TYPE_INVALID,
- GST_RTCP_TYPE_INVALID);
return packet->type;
}