diff options
author | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2012-01-18 19:54:34 +0000 |
---|---|---|
committer | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2012-01-18 19:54:34 +0000 |
commit | 3119dd2de36dbd8bb9af95ab1826c15f3099b597 (patch) | |
tree | 76b0324c6e93b86550e63ad02f1154580ce79526 /src/audio_out/audio_file_out.c | |
parent | 7366cab446742882341e4a5304527e8b1a6965eb (diff) | |
parent | cb6e4b4ffd49cdef83c6d025f175cf6a79705fc8 (diff) | |
download | xine-lib-3119dd2de36dbd8bb9af95ab1826c15f3099b597.tar.gz xine-lib-3119dd2de36dbd8bb9af95ab1826c15f3099b597.tar.bz2 |
Merge.
Diffstat (limited to 'src/audio_out/audio_file_out.c')
-rw-r--r-- | src/audio_out/audio_file_out.c | 16 |
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 4f4e6bc47..0a4471a19 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); |