Discussion:
[PATCH] improve fallback mode
Johannes Weißl
2011-05-06 22:33:33 UTC
Permalink
- use '*' instead of 'any', because it can't be a valid extension
- include other extensions as well, since they are used for
tab-expansion
---
ffmpeg.c | 7 +++----
input.c | 2 +-
2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/ffmpeg.c b/ffmpeg.c
index 4d65388..8095abe 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -498,15 +498,14 @@ const struct input_plugin_ops ip_ops = {
};

const int ip_priority = 30;
-#ifdef USE_FALLBACK_IP
-const char *const ip_extensions[] = { "any", NULL };
-#else
const char *const ip_extensions[] = {
"ac3", "aif", "aifc", "aiff", "ape", "au", "mka", "shn", "tta", "wma",
/* also supported by other plugins */
"aac", "fla", "flac", "m4a", "m4b", "mp+", "mp2", "mp3", "mp4", "mpc",
"mpp", "ogg", "wav", "wv",
+#ifdef USE_FALLBACK_IP
+ "*",
+#endif
NULL
};
-#endif
const char *const ip_mime_types[] = { NULL };
diff --git a/input.c b/input.c
index e203528..93c3aaa 100644
--- a/input.c
+++ b/input.c
@@ -125,7 +125,7 @@ static const struct input_plugin_ops *get_ops_by_extension(const char *ext, stru
int i;

for (i = 0; exts[i]; i++) {
- if (strcasecmp(ext, exts[i]) == 0 || strcmp("any", exts[i]) == 0) {
+ if (strcasecmp(ext, exts[i]) == 0 || strcmp("*", exts[i]) == 0) {
*headp = node;
return ip->ops;
}
--
1.7.4.4
Gregory Petrosyan
2011-05-08 17:27:53 UTC
Permalink
Post by Johannes Weißl
- use '*' instead of 'any', because it can't be a valid extension
- include other extensions as well, since they are used for
tab-expansion
Merged, thanks!

Gregory

Loading...