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
This commit is contained in:
Sergey N. Gorshkov 2012-10-12 10:57:44 +04:00 committed by Tim-Philipp Müller
parent 65add5533a
commit 6d0d209a28

View file

@ -243,7 +243,7 @@ gst_rtmp_sink_render (GstBaseSink * bsink, GstBuffer * buf)
gst_buffer_map (buf, &map, GST_MAP_READ); 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; goto write_failed;
gst_buffer_unmap (buf, &map); gst_buffer_unmap (buf, &map);