* Local prototypes
*****************************************************************************/
static ssize_t Read (access_t *, uint8_t *, size_t);
-static int Seek (access_t *, int64_t);
+static int Seek (access_t *, uint64_t);
static int Control(access_t *, int, va_list);
static int SetupAvio(access_t *);
*/
char *url;
if (!strcmp(access->psz_access, "avio"))
- url = strdup(access->psz_path);
- else if (asprintf(&url, "%s://%s", access->psz_access, access->psz_path) < 0)
+ url = strdup(access->psz_location);
+ else if (asprintf(&url, "%s://%s", access->psz_access,
+ access->psz_location) < 0)
url = NULL;
if (!url)
}
-static int Seek(access_t *access, int64_t position)
+static int Seek(access_t *access, uint64_t position)
{
access_sys_t *sys = access->p_sys;
- if (url_seek(sys->context, position, SEEK_SET) < 0) {
- msg_Err(access, "Seek to %"PRIi64" failed\n", position);
+ if (position > INT64_MAX ||
+ url_seek(sys->context, position, SEEK_SET) < 0) {
+ msg_Err(access, "Seek to %"PRIu64" failed\n", position);
if (access->info.i_size <= 0 || position != access->info.i_size)
return VLC_EGENERIC;
}