From 6d0d209a28bfb88e61bba1cb32bd24c1bfd8f485 Mon Sep 17 00:00:00 2001 From: "Sergey N. Gorshkov" Date: Fri, 12 Oct 2012 10:57:44 +0400 Subject: [PATCH] rtmpsink: handle RTMP_Write() return value correctly Error might also be negative (-1). Unclear if 0 should be fatal as well though. https://bugzilla.gnome.org/show_bug.cgi?id=681111 https://bugzilla.gnome.org/show_bug.cgi?id=686009 --- ext/rtmp/gstrtmpsink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/rtmp/gstrtmpsink.c b/ext/rtmp/gstrtmpsink.c index 8caa80fcda..83d97a10b1 100644 --- a/ext/rtmp/gstrtmpsink.c +++ b/ext/rtmp/gstrtmpsink.c @@ -243,7 +243,7 @@ gst_rtmp_sink_render (GstBaseSink * bsink, GstBuffer * buf) gst_buffer_map (buf, &map, GST_MAP_READ); - if (!RTMP_Write (sink->rtmp, (char *) map.data, map.size)) + if (RTMP_Write (sink->rtmp, (char *) map.data, map.size) <= 0) goto write_failed; gst_buffer_unmap (buf, &map);