summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/elements/gstfilesink.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/elements/gstfilesink.c b/plugins/elements/gstfilesink.c
index b59d72fc6..470ad5e5a 100644
--- a/plugins/elements/gstfilesink.c
+++ b/plugins/elements/gstfilesink.c
@@ -590,7 +590,8 @@ gst_file_sink_event (GstBaseSink * sink, GstEvent * event)
case GST_EVENT_FLUSH_STOP:
if (filesink->current_pos != 0 && filesink->seekable) {
gst_file_sink_do_seek (filesink, 0);
- ftruncate (fileno (filesink->file), 0);
+ if (ftruncate (fileno (filesink->file), 0))
+ goto flush_failed;
}
break;
case GST_EVENT_EOS: