mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-30 13:41:48 +00:00
rtph265depay: prevent trying to get 0 bytes from adapter
This causes an assertion and would lead to getting a NULL instead of a buffer. Without proper checking this would easily lead to a segfault. Related to rpth264depay: https://bugzilla.gnome.org/show_bug.cgi?id=737199
This commit is contained in:
parent
7ae49b46ff
commit
470c8b3720
1 changed files with 6 additions and 4 deletions
|
@ -1167,10 +1167,12 @@ gst_rtp_h265_depay_process (GstRTPBaseDepayload * depayload, GstBuffer * buf)
|
||||||
}
|
}
|
||||||
|
|
||||||
outsize = gst_adapter_available (rtph265depay->adapter);
|
outsize = gst_adapter_available (rtph265depay->adapter);
|
||||||
outbuf = gst_adapter_take_buffer (rtph265depay->adapter, outsize);
|
if (outsize > 0) {
|
||||||
|
outbuf = gst_adapter_take_buffer (rtph265depay->adapter, outsize);
|
||||||
outbuf = gst_rtp_h265_depay_handle_nal (rtph265depay, outbuf, timestamp,
|
outbuf =
|
||||||
marker);
|
gst_rtp_h265_depay_handle_nal (rtph265depay, outbuf, timestamp,
|
||||||
|
marker);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 49:
|
case 49:
|
||||||
|
|
Loading…
Reference in a new issue