From ee7db7b0b950c93c31ab139f6b79acf77f1ca241 Mon Sep 17 00:00:00 2001 From: Ramiro Polla Date: Thu, 9 Aug 2007 23:41:59 +0000 Subject: [PATCH] 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 --- libavformat/file.c | 15 ++------------- 1 file 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, };