Skip to content
Snippets Groups Projects
Commit ee7db7b0 authored by Ramiro Polla's avatar Ramiro Polla
Browse files

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
parent 1642cb6b
No related branches found
No related tags found
No related merge requests found
...@@ -110,22 +110,11 @@ static int pipe_read(URLContext *h, unsigned char *buf, int size) ...@@ -110,22 +110,11 @@ static int pipe_read(URLContext *h, unsigned char *buf, int size)
return read(fd, buf, 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 = { URLProtocol pipe_protocol = {
"pipe", "pipe",
pipe_open, pipe_open,
pipe_read, file_read,
pipe_write, file_write,
NULL, NULL,
pipe_close, pipe_close,
}; };
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment