Commit 9b6f2c74 authored by Martin Sliwka's avatar Martin Sliwka Committed by Michael Niedermayer

file: Fix handling of windows named pipes

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 11153a93
...@@ -99,7 +99,7 @@ static int64_t file_seek(URLContext *h, int64_t pos, int whence) ...@@ -99,7 +99,7 @@ static int64_t file_seek(URLContext *h, int64_t pos, int whence)
if (whence == AVSEEK_SIZE) { if (whence == AVSEEK_SIZE) {
struct stat st; struct stat st;
int ret = fstat(fd, &st); int ret = fstat(fd, &st);
return ret < 0 ? AVERROR(errno) : st.st_size; return ret < 0 ? AVERROR(errno) : (S_ISFIFO(st.st_mode) ? 0 : st.st_size);
} }
return lseek(fd, pos, whence); return lseek(fd, pos, whence);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment