summaryrefslogtreecommitdiff
path: root/libavformat/file.c
diff options
context:
space:
mode:
authorRamiro Polla <ramiro.polla@gmail.com>2007-08-09 23:41:59 +0000
committerRamiro Polla <ramiro.polla@gmail.com>2007-08-09 23:41:59 +0000
commitee7db7b0b950c93c31ab139f6b79acf77f1ca241 (patch)
tree5e3fe4615d0af0506ed5cbad870007f141194e64 /libavformat/file.c
parent1642cb6b2e27437abd2bd9ee9a570446382cb26e (diff)
downloadffmpeg-ee7db7b0b950c93c31ab139f6b79acf77f1ca241.tar.gz
Make the pipe URLProtocol share read and write functions with the file URLProtocol
Originally committed as revision 10041 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/file.c')
-rw-r--r--libavformat/file.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/libavformat/file.c b/libavformat/file.c
index 70c9a645cb..1eaf01c2ce 100644
--- a/libavformat/file.c
+++ b/libavformat/file.c
@@ -110,22 +110,11 @@ static int pipe_read(URLContext *h, unsigned char *buf, int size)
return read(fd, buf, size);
}
-static int pipe_write(URLContext *h, unsigned char *buf, int size)
-{
- int fd = (size_t)h->priv_data;
- return write(fd, buf, size);
-}
-
-static int pipe_close(URLContext *h)
-{
- return 0;
-}
-
URLProtocol pipe_protocol = {
"pipe",
pipe_open,
- pipe_read,
- pipe_write,
+ file_read,
+ file_write,
NULL,
pipe_close,
};