gstgiobasesink: Handle incomplete writes in gst_gio_base_sink_render()
authorRobin Burchell <robin.burchell@crimson.no>
Tue, 6 Apr 2021 11:22:15 +0000 (13:22 +0200)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Fri, 9 Apr 2021 07:35:07 +0000 (07:35 +0000)
commit1a1a885db4dabd8505265db7c63979db521cfd28
tree0f261e043e4e47bd8ee9c2c03cc3ae76c5a0c33e
parentb70e83c409acfd0c29defb24f1e8f749c8560560
gstgiobasesink: Handle incomplete writes in gst_gio_base_sink_render()

As the comment asked, yes, incomplete writes can happen.
I have encountered this with an sshfs mount, for example.

It seems like g_output_stream_write_all() is designed to handle this case,
by not returning until the requested buffer has been completely written,
or an error occurs, which seems to match up with the desired behaviour.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/885

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1100>
gst/gio/gstgiobasesink.c