diff options
author | Uoti Urpala <uau@mplayer2.org> | 2011-07-06 06:37:22 +0300 |
---|---|---|
committer | Uoti Urpala <uau@mplayer2.org> | 2011-07-06 06:37:22 +0300 |
commit | a4166ac23933b4af9074ad801615127135bc98f3 (patch) | |
tree | b062a0105debe93e04326037df116ac0e3487520 | |
parent | 1f6970b8553cd93fc21f012478f478f9c356d586 (diff) | |
download | mpv-a4166ac23933b4af9074ad801615127135bc98f3.tar.bz2 mpv-a4166ac23933b4af9074ad801615127135bc98f3.tar.xz |
cleanup: remove useless set_codec_path() function
This function was left over from older logic to manipulate the
"codec_path" global variable. Now that variable is fully handled by
the general option system, so that the only effect of the function
was to introduce memory leaks in some circumstances. Delete the
useless function.
-rw-r--r-- | mplayer.c | 3 | ||||
-rw-r--r-- | path.c | 16 |
2 files changed, 0 insertions, 19 deletions
@@ -3861,9 +3861,6 @@ int i; set_priority(); #endif - if (codec_path) - set_codec_path(codec_path); - if(opts->video_driver_list && strcmp(opts->video_driver_list[0],"help")==0){ list_video_out(); opt_exit = 1; @@ -181,22 +181,6 @@ void set_path_env(void) char *codec_path = BINARY_CODECS_PATH; -static int needs_free = 0; - -void set_codec_path(const char *path) -{ - if (needs_free) - free(codec_path); - if (path == 0) { - codec_path = BINARY_CODECS_PATH; - needs_free = 0; - return; - } - codec_path = malloc(strlen(path) + 1); - strcpy(codec_path, path); - needs_free = 1; -} - char *mp_basename(const char *path) { char *s; |