rtpmp2tpay: do not try to flush a packet when no data is available

https://bugzilla.gnome.org/show_bug.cgi?id=668874
This commit is contained in:
Vincent Penquerc'h 2012-01-30 14:52:37 +00:00
parent c16fed2ad9
commit d651baf05a

View file

@ -127,6 +127,8 @@ gst_rtp_mp2t_pay_flush (GstRTPMP2TPay * rtpmp2tpay)
GstBuffer *outbuf;
avail = gst_adapter_available (rtpmp2tpay->adapter);
if (avail == 0)
return GST_FLOW_OK;
outbuf = gst_rtp_buffer_new_allocate (avail, 0, 0);
/* get payload */