mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-28 03:00:35 +00:00
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.
This commit is contained in:
parent
f83f57b648
commit
d927114ef8
1 changed files with 2 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue