diff options
author | David Fernandez <d.fernandezlop@gmail.com> | 2016-02-16 15:10:34 +0100 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.com> | 2016-04-06 14:13:53 +0100 |
commit | 2df0ea3ab9c259533a83c66cabf0128b226f93d1 (patch) | |
tree | 2dd412d8cc99e296666baf2e6aee487c73e0bc69 | |
parent | a8dc763e48aa30f20624aa160c8c0f7e780b3174 (diff) | |
download | gstreamer-plugins-bad-2df0ea3ab9c259533a83c66cabf0128b226f93d1.tar.gz |
curlbasesink: don't send empty buffers
Fixes problem in curlhttpsink when qtmux uses faststart.
https://bugzilla.gnome.org/show_bug.cgi?id=762013
-rw-r--r-- | ext/curl/gstcurlbasesink.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/ext/curl/gstcurlbasesink.c b/ext/curl/gstcurlbasesink.c index b47f2467d..b13c182eb 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) { |