Browse Source

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
tags/v0.5
Ramiro Polla 18 years ago
parent
commit
ee7db7b0b9
1 changed files with 2 additions and 13 deletions
  1. +2
    -13
      libavformat/file.c

+ 2
- 13
libavformat/file.c 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,
};

Loading…
Cancel
Save