aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorMartin Sliwka <martin.sliwka@gmail.com>2012-06-15 15:05:33 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-06-15 15:05:33 +0200
commit9b6f2c7483952d889dfafc5d0ffbc34c0805c841 (patch)
tree77625ff3ad508a604d88dffd0e5aa40d30d10253 /libavformat
parent11153a9371a84d881809f43e60830d3ed8ae60b9 (diff)
downloadffmpeg-9b6f2c7483952d889dfafc5d0ffbc34c0805c841.tar.gz
file: Fix handling of windows named pipes
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/file.c b/libavformat/file.c
index 1352bcc546..0c566c91a8 100644
--- a/libavformat/file.c
+++ b/libavformat/file.c
@@ -99,7 +99,7 @@ static int64_t file_seek(URLContext *h, int64_t pos, int whence)
if (whence == AVSEEK_SIZE) {
struct stat 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);
}