mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-30 13:41:48 +00:00
rtcpbuffer: test for len instead of type
The function rtcp_packet_min_length() returns a length for each known type and -1 for unknown types. This change fixes the test accordingly and silences the following warning. gstrtcpbuffer.c:567:12: error: comparison of constant -1 with expression of type 'GstRTCPType' is always false [-Werror,-Wtautological-constant-out-of-range-compare] if (type == -1)
This commit is contained in:
parent
3ee89d6e3c
commit
c1a5a36bba
1 changed files with 2 additions and 2 deletions
|
@ -564,7 +564,7 @@ gst_rtcp_buffer_add_packet (GstRTCPBuffer * rtcp, GstRTCPType type,
|
|||
* start a compount packet. Next we figure out if we have enough free space in
|
||||
* the buffer to continue. */
|
||||
len = rtcp_packet_min_length (type);
|
||||
if (type == -1)
|
||||
if (len == -1)
|
||||
goto unknown_type;
|
||||
if (packet->offset + len >= maxsize)
|
||||
goto no_space;
|
||||
|
|
Loading…
Reference in a new issue