From f518cf7ea99e9282508f551ecb43892f6aabcbc4 Mon Sep 17 00:00:00 2001 From: Uoti Urpala Date: Wed, 23 Apr 2008 06:35:36 +0300 Subject: Add option pointer to stream struct (at least temporarily) The stream code does not access many option variables directly, but it does access some such as audio_id and network_bandwidth (and does that without including proper headers for them). Add option pointer to the stream struct to allow access to those variables. Remove the unused (always NULL) and clumsy-looking char** options parameter in the open_stream call and replace it with the option pointer. The parameter is currently only set in the main open_stream() call in MPlayer.c and not in any other locations that can open a stream. In the long term it might be better to pass a more limited set of values somehow, but this should do for now. --- stream/open.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'stream/open.c') diff --git a/stream/open.c b/stream/open.c index 0ec0222c32..dad7c49db7 100644 --- a/stream/open.c +++ b/stream/open.c @@ -30,7 +30,8 @@ int dvd_title=0; // Open a new stream (stdin/file/vcd/url) -stream_t* open_stream(char* filename,char** options, int* file_format){ +stream_t* open_stream(char* filename, struct MPOpts *options, int* file_format) +{ // Check if playlist or unknown if (*file_format != DEMUXER_TYPE_PLAYLIST){ *file_format=DEMUXER_TYPE_UNKNOWN; -- cgit v1.2.3