mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-28 05:33:14 +00:00
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:
@@ -20,11 +20,8 @@
|
||||
|
||||
#include "stream.h"
|
||||
|
||||
static int open_f(stream_t *stream, int mode)
|
||||
static int open_f(stream_t *stream)
|
||||
{
|
||||
if (mode != STREAM_READ)
|
||||
return STREAM_ERROR;
|
||||
|
||||
stream->type = STREAMTYPE_AVDEVICE;
|
||||
stream->demuxer = "lavf";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user