summaryrefslogtreecommitdiffstats
path: root/stream/stream.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-05-24 17:47:01 +0200
committerwm4 <wm4@nowhere>2013-05-26 17:13:09 +0200
commit3d6b4ea4b6bd5855205bbfe1bfd023844fa5e964 (patch)
treec8367d63226458772ad41d47e6f89984fabe4aa8 /stream/stream.c
parent3face4300ed01d0b9394efab4dfdcf997cc48704 (diff)
downloadmpv-3d6b4ea4b6bd5855205bbfe1bfd023844fa5e964.tar.bz2
mpv-3d6b4ea4b6bd5855205bbfe1bfd023844fa5e964.tar.xz
stream: kill memory streams
These are unused by now, and it relied on some assumptions that have been broken by now.
Diffstat (limited to 'stream/stream.c')
-rw-r--r--stream/stream.c23
1 files changed, 3 insertions, 20 deletions
diff --git a/stream/stream.c b/stream/stream.c
index b6f15348fb..3f7983e294 100644
--- a/stream/stream.c
+++ b/stream/stream.c
@@ -137,6 +137,8 @@ static const stream_info_t *const auto_open_streams[] = {
NULL
};
+static stream_t *new_stream(int fd, int type);
+
static stream_t *open_stream_plugin(const stream_info_t *sinfo,
const char *filename,
int mode, struct MPOpts *options,
@@ -626,26 +628,7 @@ void stream_update_size(stream_t *s)
}
}
-stream_t *new_memory_stream(unsigned char *data, int len)
-{
- stream_t *s;
-
- if (len < 0)
- return NULL;
- s = calloc(1, sizeof(stream_t) + len);
- s->fd = -1;
- s->type = STREAMTYPE_MEMORY;
- s->buf_pos = 0;
- s->buf_len = len;
- s->start_pos = 0;
- s->end_pos = len;
- stream_reset(s);
- s->pos = len;
- memcpy(s->buffer, data, len);
- return s;
-}
-
-stream_t *new_stream(int fd, int type)
+static stream_t *new_stream(int fd, int type)
{
stream_t *s = talloc_zero(NULL, stream_t);