diff options
author | Josep Torra <jtorra@oblong.com> | 2019-03-21 17:50:34 +0100 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.com> | 2019-05-01 17:54:19 +0100 |
commit | 39f4fda67c715a77153e500bda4be66056540bcc (patch) | |
tree | eacd201dfb95cf07acb8172c38dcda4d811e45f8 | |
parent | e47bd848e2596689b648da7ea74ba87596e0780d (diff) | |
download | gstreamer-plugins-base-39f4fda67c715a77153e500bda4be66056540bcc.tar.gz |
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)
-rw-r--r-- | gst-libs/gst/rtp/gstrtcpbuffer.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gst-libs/gst/rtp/gstrtcpbuffer.c b/gst-libs/gst/rtp/gstrtcpbuffer.c index 3ced400cb..d7e608e6a 100644 --- a/gst-libs/gst/rtp/gstrtcpbuffer.c +++ b/gst-libs/gst/rtp/gstrtcpbuffer.c @@ -502,7 +502,7 @@ gst_rtcp_packet_move_to_next (GstRTCPPacket * packet) g_return_val_if_fail (packet->rtcp != NULL, FALSE); g_return_val_if_fail (packet->rtcp->map.flags & GST_MAP_READ, FALSE); - /* if we have a padding or invalid packet, it must be the last, + /* if we have a padding or invalid packet, it must be the last, * return FALSE */ if (packet->type == GST_RTCP_TYPE_INVALID || packet->padding) goto end; @@ -561,7 +561,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) |