summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2010-02-25 22:47:04 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2010-02-25 22:47:04 +0000
commit72d18a204fa7cd3b2ed92edcb54cb5190b40dfc1 (patch)
tree2f520aac7ab81f0d345003187c5820e3bc39185f
parent136c046e06cd5c614aafcef111040c6e8e6dd373 (diff)
downloadmpv-72d18a204fa7cd3b2ed92edcb54cb5190b40dfc1.tar.bz2
mpv-72d18a204fa7cd3b2ed92edcb54cb5190b40dfc1.tar.xz
Mark stream open filename parameter as const, the filename string is not
modified by these functions. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30739 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--stream/open.c2
-rw-r--r--stream/stream.c6
-rw-r--r--stream/stream.h6
3 files changed, 7 insertions, 7 deletions
diff --git a/stream/open.c b/stream/open.c
index c207516184..2fa4c9fc99 100644
--- a/stream/open.c
+++ b/stream/open.c
@@ -47,7 +47,7 @@ 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(const char* filename,char** options, int* file_format){
// Check if playlist or unknown
if (*file_format != DEMUXER_TYPE_PLAYLIST){
*file_format=DEMUXER_TYPE_UNKNOWN;
diff --git a/stream/stream.c b/stream/stream.c
index bcd1f907c3..daecc09d2c 100644
--- a/stream/stream.c
+++ b/stream/stream.c
@@ -140,7 +140,7 @@ static const stream_info_t* const auto_open_streams[] = {
NULL
};
-static stream_t* open_stream_plugin(const stream_info_t* sinfo, char* filename,
+static stream_t* open_stream_plugin(const stream_info_t* sinfo, const char* filename,
int mode, char** options, int* file_format,
int* ret, char** redirected_url)
{
@@ -208,7 +208,7 @@ static stream_t* open_stream_plugin(const stream_info_t* sinfo, char* filename,
}
-stream_t* open_stream_full(char* filename,int mode, char** options, int* file_format) {
+stream_t* open_stream_full(const char* filename,int mode, char** options, int* file_format) {
int i,j,l,r;
const stream_info_t* sinfo;
stream_t* s;
@@ -250,7 +250,7 @@ stream_t* open_stream_full(char* filename,int mode, char** options, int* file_fo
return NULL;
}
-stream_t* open_output_stream(char* filename,char** options) {
+stream_t* open_output_stream(const char* filename, char** options) {
int file_format; //unused
if(!filename) {
mp_msg(MSGT_OPEN,MSGL_ERR,"open_output_stream(), NULL filename, report this bug\n");
diff --git a/stream/stream.h b/stream/stream.h
index fa12186696..f1a3667343 100644
--- a/stream/stream.h
+++ b/stream/stream.h
@@ -339,9 +339,9 @@ int stream_control(stream_t *s, int cmd, void *arg);
stream_t* new_stream(int fd,int type);
void free_stream(stream_t *s);
stream_t* new_memory_stream(unsigned char* data,int len);
-stream_t* open_stream(char* filename,char** options,int* file_format);
-stream_t* open_stream_full(char* filename,int mode, char** options, int* file_format);
-stream_t* open_output_stream(char* filename,char** options);
+stream_t* open_stream(const char* filename,char** options,int* file_format);
+stream_t* open_stream_full(const char* filename,int mode, char** options, int* file_format);
+stream_t* open_output_stream(const char* filename,char** options);
/// Set the callback to be used by libstream to check for user
/// interruption during long blocking operations (cache filling, etc).
void stream_set_interrupt_callback(int (*cb)(int));