mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
file: Fix mmap error check.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
6dafa7065b
commit
10ff2967ea
@ -75,7 +75,7 @@ int av_file_map(const char *filename, uint8_t **bufptr, size_t *size,
|
||||
|
||||
#if HAVE_MMAP
|
||||
ptr = mmap(NULL, *size, PROT_READ|PROT_WRITE, MAP_PRIVATE, fd, 0);
|
||||
if ((int)(ptr) == -1) {
|
||||
if (ptr == (void*)-1) {
|
||||
err = AVERROR(errno);
|
||||
av_strerror(err, errbuf, sizeof(errbuf));
|
||||
av_log(&file_log_ctx, AV_LOG_ERROR, "Error occurred in mmap(): %s\n", errbuf);
|
||||
|
Loading…
Reference in New Issue
Block a user