mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 17:20:36 +00:00
rtpvp8depay: Check available bytes before copy
Need to check that the number of bytes we want to copy from the adapter actually is available and handle the error case gracefully. This error may happen if malformed packets are received and we don't have a complete frame. https://bugzilla.gnome.org/show_bug.cgi?id=752663
This commit is contained in:
parent
3740e69957
commit
45e05706e2
1 changed files with 2 additions and 0 deletions
|
@ -173,6 +173,8 @@ gst_rtp_vp8_depay_process (GstRTPBaseDepayload * depay, GstRTPBuffer * rtp)
|
|||
GstBuffer *out;
|
||||
guint8 header[10];
|
||||
|
||||
if (gst_adapter_available (self->adapter) < 10)
|
||||
goto too_small;
|
||||
gst_adapter_copy (self->adapter, &header, 0, 10);
|
||||
|
||||
out = gst_adapter_take_buffer (self->adapter,
|
||||
|
|
Loading…
Reference in a new issue