Mercurial > libavformat.hg
changeset 2352:3dfa90f47d53 libavformat
Make the pipe URLProtocol share read and write functions with the file URLProtocol
author | ramiro |
---|---|
date | Thu, 09 Aug 2007 23:41:59 +0000 |
parents | b9a881c0967e |
children | 0bf0afe32fcc |
files | file.c |
diffstat | 1 files changed, 2 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/file.c Thu Aug 09 23:39:05 2007 +0000 +++ b/file.c Thu Aug 09 23:41:59 2007 +0000 @@ -110,22 +110,11 @@ 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, };