diff options
author | wm4 <wm4@nowhere> | 2015-08-20 11:08:22 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-08-20 11:08:22 +0200 |
commit | 1b93a7a89512d1250b3b6069aa788a522625ab71 (patch) | |
tree | e60dc4c442a26654df996a48965226cdc8eafe9f /stream/stream_libarchive.c | |
parent | b8fe17f2e638fc95d09f07889cc94ef8783ed17f (diff) | |
download | mpv-1b93a7a89512d1250b3b6069aa788a522625ab71.tar.bz2 mpv-1b93a7a89512d1250b3b6069aa788a522625ab71.tar.xz |
stream_libarchive: fix libarchive callback signature
libarchive uses a quite confusing ifdeffery mess for some of the types
used in callbacks. Currently, archive_read_set_seek_callback() causes a
warning at least on Windows due to mismatching return type. The header
file uses __LA_INT64_T as return type, so I think the user is intended
to use int64_t.
(The ssize_t return type for the read_cb seems correct, on the other
hand.)
Diffstat (limited to 'stream/stream_libarchive.c')
-rw-r--r-- | stream/stream_libarchive.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/stream/stream_libarchive.c b/stream/stream_libarchive.c index 6a39f8fac8..796c5c0b37 100644 --- a/stream/stream_libarchive.c +++ b/stream/stream_libarchive.c @@ -31,7 +31,7 @@ static ssize_t read_cb(struct archive *arch, void *priv, const void **buffer) return MPMAX(res, 0); } -static ssize_t seek_cb(struct archive *arch, void *priv, +static int64_t seek_cb(struct archive *arch, void *priv, int64_t offset, int whence) { struct mp_archive *mpa = priv; |