summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-08-20 11:08:22 +0200
committerwm4 <wm4@nowhere>2015-08-20 11:08:22 +0200
commit1b93a7a89512d1250b3b6069aa788a522625ab71 (patch)
treee60dc4c442a26654df996a48965226cdc8eafe9f
parentb8fe17f2e638fc95d09f07889cc94ef8783ed17f (diff)
downloadmpv-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.)
-rw-r--r--stream/stream_libarchive.c2
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;