diff options
| author | František Dvořák <valtri@users.sourceforge.net> | 2006-06-11 15:09:47 +0000 |
|---|---|---|
| committer | František Dvořák <valtri@users.sourceforge.net> | 2006-06-11 15:09:47 +0000 |
| commit | ba717771e1356acbc7c4c35cb2828098a5a31675 (patch) | |
| tree | 7e45bca28965eb0b52b238116b1e124bf834be1b /src/libw32dll/common.c | |
| parent | e07d8ace636273c3b848c5dc6bdec6b86c3b3270 (diff) | |
| download | xine-lib-ba717771e1356acbc7c4c35cb2828098a5a31675.tar.gz xine-lib-ba717771e1356acbc7c4c35cb2828098a5a31675.tar.bz2 | |
Re-commit lost change: Fix the freeze on QuickTime files when configured with non-existing win32 codecs path. win32.c have known nothing about all paths tested in module.c.
CVS patchset: 8033
CVS date: 2006/06/11 15:09:47
Diffstat (limited to 'src/libw32dll/common.c')
| -rw-r--r-- | src/libw32dll/common.c | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/src/libw32dll/common.c b/src/libw32dll/common.c new file mode 100644 index 000000000..1f42288c2 --- /dev/null +++ b/src/libw32dll/common.c @@ -0,0 +1,39 @@ +#ifdef HAVE_DIRENT_H +#include <dirent.h> +#endif + +static char *get_win32_codecs_path(config_values_t *cfg) { + DIR *dir; + char *path, *cfgpath; + char *listpath[] = { "", + "/usr/lib/codecs", + "/usr/local/lib/codecs", + "/usr/lib/win32", + "/usr/local/lib/win32", + NULL }; + int i = 0; + + cfgpath = cfg->register_string (cfg, "decoder.external.win32_codecs_path", WIN32_PATH, + _("path to Win32 codecs"), + _("If you have the Windows or Apple Quicktime codec packs " + "installed, specify the path the codec directory here. " + "If xine can find the Windows or Apple Quicktime codecs, " + "it will use them to decode various Windows Media and " + "Quicktime streams for you. Consult the xine FAQ for " + "more information on how to install the codecs."), + 10, NULL, NULL); + + while (listpath[i]) { + if (i == 0) path = cfgpath; + else path = listpath[i]; + + if ((dir = opendir(path)) != NULL) { + closedir(dir); + return path; + } + + i++; + } + + return NULL; +} |
