mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
asfdepay: guard against dropped buffers
If a buffer was dropped, we might request data from the adapter that is not there and then we get a NULL buffer.
This commit is contained in:
parent
36d0450d6e
commit
22b82d30e5
1 changed files with 2 additions and 2 deletions
|
@ -324,7 +324,6 @@ gst_rtp_asf_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf)
|
|||
GstBuffer *sub;
|
||||
|
||||
/* Fragmented packet handling */
|
||||
|
||||
outbuf = NULL;
|
||||
|
||||
if (len_offs == 0 && (available = gst_adapter_available (depay->adapter))) {
|
||||
|
@ -352,7 +351,8 @@ gst_rtp_asf_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf)
|
|||
available, len_offs);
|
||||
sub = gst_adapter_take_buffer (depay->adapter, len_offs);
|
||||
gst_adapter_clear (depay->adapter);
|
||||
gst_adapter_push (depay->adapter, sub);
|
||||
if (sub)
|
||||
gst_adapter_push (depay->adapter, sub);
|
||||
}
|
||||
}
|
||||
sub = gst_rtp_buffer_get_payload_subbuffer (buf, offset, packet_len);
|
||||
|
|
Loading…
Reference in a new issue