mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-02 04:22:27 +00:00
rtpmpvpay: Don't create empty buffer list
If there's nothing to send, just return
This commit is contained in:
parent
b4edfb5998
commit
50c3733a89
1 changed files with 6 additions and 0 deletions
|
@ -183,6 +183,10 @@ gst_rtp_mpv_pay_flush (GstRTPMPVPay * rtpmpvpay)
|
|||
|
||||
ret = GST_FLOW_OK;
|
||||
|
||||
GST_DEBUG_OBJECT (rtpmpvpay, "available %u", avail);
|
||||
if (avail == 0)
|
||||
return GST_FLOW_OK;
|
||||
|
||||
list =
|
||||
gst_buffer_list_new_sized (avail / (GST_RTP_BASE_PAYLOAD_MTU (rtpmpvpay) -
|
||||
RTP_HEADER_LEN) + 1);
|
||||
|
@ -231,6 +235,8 @@ gst_rtp_mpv_pay_flush (GstRTPMPVPay * rtpmpvpay)
|
|||
gst_rtp_copy_video_meta (rtpmpvpay, outbuf, paybuf);
|
||||
outbuf = gst_buffer_append (outbuf, paybuf);
|
||||
|
||||
GST_DEBUG_OBJECT (rtpmpvpay, "Adding buffer");
|
||||
|
||||
GST_BUFFER_PTS (outbuf) = rtpmpvpay->first_ts;
|
||||
gst_buffer_list_add (list, outbuf);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue