In configure: Changed variable name FFMPEG_DEFAULT to USE_FALLBACK_IP.
Changed format of usage() to accomodate longer variable name.
In ffmpeg.c: Changed variable name FFMPEG_DEFAULT to USE_FALLBACK_IP.
In input.c: Removed variable 'int ffmpeg_fallback'. Changed variable
'struct ip *use_ffmpeg' to 'struct ip *fallback_ip'. Removed ffmpeg
specific code.
---
configure | 46 +++++++++++++++++++++++-----------------------
ffmpeg.c | 2 +-
input.c | 15 +++++----------
3 files changed, 29 insertions(+), 34 deletions(-)
diff --git a/configure b/configure
index ce7072a..75df040 100755
--- a/configure
+++ b/configure
@@ -294,7 +294,7 @@ prefix=/usr/local
DEBUG=1
CONFIG_TREMOR=n
CONFIG_MIKMOD=n
-FFMPEG_DEFAULT=n
+USE_FALLBACK_IP=n
# unset CONFIG_* variables: if check succeeds 'y', otherwise 'n'
USAGE="
@@ -308,27 +308,27 @@ Options:
DEBUG Debugging level (0-2) [$DEBUG]
Optional Features: y/n
- CONFIG_FLAC Free Lossless Audio Codec (.flac, .fla) [auto]
- CONFIG_MAD MPEG Audio Decoder (.mp3, .mp2, streams) [auto]
- CONFIG_MODPLUG libmodplug (.mod, .x3m, ...) [auto]
- CONFIG_MIKMOD libmikmod (.mod, .x3m, ...) [n]
- CONFIG_MPC libmpcdec (Musepack .mpc, .mpp, .mp+) [auto]
- CONFIG_VORBIS Ogg/Vorbis (.ogg, application/ogg, audio/x-ogg) [auto]
- CONFIG_TREMOR Use Tremor as Ogg/Vorbis input plugin [n]
- CONFIG_WAV WAV [y]
- CONFIG_WAVPACK WavPack (.wv, audio/x-wavpack) [auto]
- CONFIG_MP4 MPEG-4 AAC (.mp4, .m4a, .m4b) [auto]
- CONFIG_AAC AAC (.aac, audio/aac, audio/aacp) [auto]
- CONFIG_FFMPEG FFMPEG (.shn, .wma) [auto]
- CONFIG_PULSE native PulseAudio output [auto]
- CONFIG_ALSA ALSA [auto]
- CONFIG_AO Libao cross-platform audio library [auto]
- CONFIG_ARTS ARTS [auto]
- CONFIG_OSS Open Sound System [auto]
- CONFIG_SUN Sun Audio [auto]
- CONFIG_WAVEOUT Windows Wave Out [auto]
- FFMPEG_DEFAULT Set FFmpeg as the default decoder for [n]
- unrecognized formats.
+ CONFIG_FLAC Free Lossless Audio Codec (.flac, .fla) [auto]
+ CONFIG_MAD MPEG Audio Decoder (.mp3, .mp2, streams) [auto]
+ CONFIG_MODPLUG libmodplug (.mod, .x3m, ...) [auto]
+ CONFIG_MIKMOD libmikmod (.mod, .x3m, ...) [n]
+ CONFIG_MPC libmpcdec (Musepack .mpc, .mpp, .mp+) [auto]
+ CONFIG_VORBIS Ogg/Vorbis (.ogg, application/ogg, audio/x-ogg) [auto]
+ CONFIG_TREMOR Use Tremor as Ogg/Vorbis input plugin [n]
+ CONFIG_WAV WAV [y]
+ CONFIG_WAVPACK WavPack (.wv, audio/x-wavpack) [auto]
+ CONFIG_MP4 MPEG-4 AAC (.mp4, .m4a, .m4b) [auto]
+ CONFIG_AAC AAC (.aac, audio/aac, audio/aacp) [auto]
+ CONFIG_FFMPEG FFMPEG (.shn, .wma) [auto]
+ CONFIG_PULSE native PulseAudio output [auto]
+ CONFIG_ALSA ALSA [auto]
+ CONFIG_AO Libao cross-platform audio library [auto]
+ CONFIG_ARTS ARTS [auto]
+ CONFIG_OSS Open Sound System [auto]
+ CONFIG_SUN Sun Audio [auto]
+ CONFIG_WAVEOUT Windows Wave Out [auto]
+ USE_FALLBACK_IP Use a specific IP for every unrecognized [n]
+ format. Currently set to ffmpeg.
Also many standard variables like CC are recognized."
@@ -392,7 +392,7 @@ config_header config/tremor.h CONFIG_TREMOR
config_header config/mpc.h MPC_SV7
config_header config/mp4.h USE_MPEG4IP
config_header config/curses.h HAVE_RESIZETERM HAVE_USE_DEFAULT_COLORS
-config_header config/ffmpeg.h FFMPEG_DEFAULT
+config_header config/ffmpeg.h USE_FALLBACK_IP
makefile_vars bindir datadir libdir mandir exampledir
makefile_vars CONFIG_FLAC CONFIG_MAD CONFIG_MIKMOD CONFIG_MODPLUG CONFIG_MPC CONFIG_VORBIS CONFIG_WAVPACK CONFIG_WAV CONFIG_MP4 CONFIG_AAC CONFIG_FFMPEG
diff --git a/ffmpeg.c b/ffmpeg.c
index 601cf0a..3f2077d 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -398,7 +398,7 @@ const struct input_plugin_ops ip_ops = {
.duration = ffmpeg_duration
};
-#ifdef FFMPEG_DEFAULT
+#ifdef USE_FALLBACK_IP
const char *const ip_extensions[] = { "any", NULL };
#else
const char *const ip_extensions[] = { "ape", "wma", NULL };
diff --git a/input.c b/input.c
index 214732d..cf6a75d 100644
--- a/input.c
+++ b/input.c
@@ -109,11 +109,9 @@ static const struct input_plugin_ops *get_ops_by_filename(const char *filename)
{
struct ip *ip;
const char *ext;
- struct ip *use_ffmpeg;
- int ffmpeg_fallback;
+ struct ip *fallback_ip;
- use_ffmpeg = NULL;
- ffmpeg_fallback = 0;
+ fallback_ip = NULL;
ext = get_extension(filename);
if (ext == NULL)
@@ -122,19 +120,16 @@ static const struct input_plugin_ops *get_ops_by_filename(const char *filename)
const char * const *exts = ip->extensions;
int i;
- if (strcasecmp("ffmpeg",ip->name) == 0)
- use_ffmpeg = ip;
for (i = 0; exts[i]; i++) {
if (strcasecmp("any", exts[i]) == 0)
- ffmpeg_fallback = 1;
+ fallback_ip = 1;
if (strcasecmp(ext, exts[i]) == 0){
return ip->ops;
}
}
}
- if(use_ffmpeg && ffmpeg_fallback){
- return use_ffmpeg->ops;
- }
+ if (fallback_ip)
+ return fallback_ip;
return NULL;
}
--
1.7.2.3
--6c2NcOVqGQ03X4Wi
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment; filename="0004-Polishing.patch"