mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
rtpbuffer: avoid underflow in size calculation
This commit is contained in:
parent
5ac9476b40
commit
db8460cbd8
1 changed files with 4 additions and 0 deletions
|
@ -294,6 +294,10 @@ gst_rtp_buffer_calc_payload_len (guint packet_len, guint8 pad_len,
|
|||
{
|
||||
g_return_val_if_fail (csrc_count <= 15, 0);
|
||||
|
||||
if (packet_len <
|
||||
GST_RTP_HEADER_LEN + (csrc_count * sizeof (guint32)) + pad_len)
|
||||
return 0;
|
||||
|
||||
return packet_len - GST_RTP_HEADER_LEN - (csrc_count * sizeof (guint32))
|
||||
- pad_len;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue