mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
rtph264pay: If the adapter is empty on EOS don't try to map its content
https://bugzilla.gnome.org/show_bug.cgi?id=699314
This commit is contained in:
parent
0584d5c4c9
commit
ae05ed4f05
1 changed files with 3 additions and 0 deletions
|
@ -1073,6 +1073,9 @@ gst_rtp_h264_pay_handle_buffer (GstRTPBasePayload * basepayload,
|
|||
gst_adapter_push (rtph264pay->adapter, buffer);
|
||||
}
|
||||
size = gst_adapter_available (rtph264pay->adapter);
|
||||
/* Nothing to do here if the adapter is empty, e.g. on EOS */
|
||||
if (size == 0)
|
||||
return GST_FLOW_OK;
|
||||
data = gst_adapter_map (rtph264pay->adapter, size);
|
||||
GST_DEBUG_OBJECT (basepayload,
|
||||
"got %" G_GSIZE_FORMAT " bytes (%" G_GSIZE_FORMAT ")", size,
|
||||
|
|
Loading…
Reference in a new issue