stream: remove chaos related to writeable streams

For some reason, we support writeable streams. (Only encoding uses that,
and the use of it looks messy enough that I want to replace it with FILE
or avio today.)

It's a chaos: most streams do not actually check the mode parameter like
they should. Simplify it, and let streams signal availability of write
mode by setting a flag in the stream info struct.
This commit is contained in:
wm4
2014-05-24 14:06:13 +02:00
parent 80cbb3bac2
commit aa87c143cb
19 changed files with 41 additions and 83 deletions

View File

@@ -664,7 +664,7 @@ static struct priv *new_dvdnav_stream(stream_t *stream, char *filename)
return priv;
}
static int open_s(stream_t *stream, int mode)
static int open_s(stream_t *stream)
{
struct priv *priv, *p;
priv = p = stream->priv;