summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/audio_out/audio_file_out.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/audio_out/audio_file_out.c b/src/audio_out/audio_file_out.c
index 802461e0e..bc40d4efd 100644
--- a/src/audio_out/audio_file_out.c
+++ b/src/audio_out/audio_file_out.c
@@ -274,10 +274,20 @@ static void ao_file_close(ao_driver_t *this_gen)
this->fname, this->bytes_written / 1024);
if (lseek(this->fd, 40, SEEK_SET) != -1) {
- write(this->fd, &len, 4);
+ if (write(this->fd, &len, 4) != 4) {
+ xprintf (this->xine, XINE_VERBOSITY_LOG, "audio_file_out: Failed to write header to file '%s': %s\n",
+ this->fname, strerror(errno));
+ }
+
len = le2me_32(this->bytes_written + 0x24);
- if (lseek(this->fd, 4, SEEK_SET) != -1)
- write(this->fd, &len, 4);
+ if (lseek(this->fd, 4, SEEK_SET) != -1) {
+ if (write(this->fd, &len, 4) != 4) {
+ xprintf (this->xine, XINE_VERBOSITY_LOG,
+ "audio_file_out: Failed to write header to file '%s': %s\n",
+ this->fname, strerror(errno));
+ }
+ }
+
}
close(this->fd);