1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

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
This commit is contained in:
Ramiro Polla 2007-08-09 23:41:59 +00:00
parent 1642cb6b2e
commit ee7db7b0b9

View File

@ -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,
};