Commit 96118c76 authored by ramiro's avatar ramiro

Make the pipe URLProtocol share read and write functions with the file URLProtocol

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@10041 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent e92b6892
......@@ -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,
};
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment