From d651baf05ad8997812e529d7f23f7f782b385e00 Mon Sep 17 00:00:00 2001 From: Vincent Penquerc'h Date: Mon, 30 Jan 2012 14:52:37 +0000 Subject: [PATCH] rtpmp2tpay: do not try to flush a packet when no data is available https://bugzilla.gnome.org/show_bug.cgi?id=668874 --- gst/rtp/gstrtpmp2tpay.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gst/rtp/gstrtpmp2tpay.c b/gst/rtp/gstrtpmp2tpay.c index 060a92fbdb..55ef623e33 100644 --- a/gst/rtp/gstrtpmp2tpay.c +++ b/gst/rtp/gstrtpmp2tpay.c @@ -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 */