From 55ba6f1ee898a9acc1bbac8dd3c53885eb9fe285 Mon Sep 17 00:00:00 2001 From: David Fernandez Date: Tue, 16 Feb 2016 15:10:34 +0100 Subject: [PATCH] curlbasesink: don't send empty buffers Fixes problem in curlhttpsink when qtmux uses faststart. https://bugzilla.gnome.org/show_bug.cgi?id=762013 --- ext/curl/gstcurlbasesink.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ext/curl/gstcurlbasesink.c b/ext/curl/gstcurlbasesink.c index 58397a1..725f1ac 100644 --- a/ext/curl/gstcurlbasesink.c +++ b/ext/curl/gstcurlbasesink.c @@ -349,12 +349,17 @@ gst_curl_base_sink_render (GstBaseSink * bsink, GstBuffer * buf) sink = GST_CURL_BASE_SINK (bsink); - GST_OBJECT_LOCK (sink); - gst_buffer_map (buf, &map, GST_MAP_READ); data = map.data; size = map.size; + if (size == 0) { + gst_buffer_unmap (buf, &map); + return GST_FLOW_OK; + } + + GST_OBJECT_LOCK (sink); + /* check if the transfer thread has encountered problems while the * pipeline thread was working elsewhere */ if (sink->flow_ret != GST_FLOW_OK) { -- 2.7.4