From 9b6f2c7483952d889dfafc5d0ffbc34c0805c841 Mon Sep 17 00:00:00 2001 From: Martin Sliwka Date: Fri, 15 Jun 2012 15:05:33 +0200 Subject: file: Fix handling of windows named pipes Signed-off-by: Michael Niedermayer --- libavformat/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libavformat/file.c') 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); } -- cgit v1.2.3