From aa87c143cb369f1448f8d08086b5ef98998b4436 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 24 May 2014 14:06:13 +0200 Subject: 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. --- stream/stream.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'stream/stream.h') diff --git a/stream/stream.h b/stream/stream.h index 5fc4c58579..ec0059e451 100644 --- a/stream/stream.h +++ b/stream/stream.h @@ -110,13 +110,14 @@ struct stream; typedef struct stream_info_st { const char *name; // opts is set from ->opts - int (*open)(struct stream *st, int mode); + int (*open)(struct stream *st); const char **protocols; int priv_size; const void *priv_defaults; const struct m_option *options; const char **url_options; bool stream_filter; + bool can_write; } stream_info_t; typedef struct stream { -- cgit v1.2.3