[FFmpeg-cvslog] file: Fix handling of windows named pipes
Martin Sliwka
git at videolan.org
Fri Jun 15 15:24:47 CEST 2012
ffmpeg | branch: master | Martin Sliwka <martin.sliwka at gmail.com> | Fri Jun 15 15:05:33 2012 +0200| [9b6f2c7483952d889dfafc5d0ffbc34c0805c841] | committer: Michael Niedermayer
file: Fix handling of windows named pipes
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9b6f2c7483952d889dfafc5d0ffbc34c0805c841
---
libavformat/file.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/file.c b/libavformat/file.c
index 1352bcc..0c566c9 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);
}
More information about the ffmpeg-cvslog
mailing list