decoder: removed stream_types

Instead of checking the stream_types bit set, we can simply check
whether the methods stream_decode() and file_decode() are implemented.
This commit is contained in:
Max Kellermann
2008-11-04 17:10:19 +01:00
parent 59c20e5afe
commit 85a7d1a148
13 changed files with 0 additions and 28 deletions

View File

@@ -108,8 +108,6 @@ static void decoder_run(void)
while ((plugin = decoder_plugin_from_mime_type(input_stream.mime, next++))) {
if (plugin->stream_decode == NULL)
continue;
if (!(plugin->stream_types & INPUT_PLUGIN_STREAM_URL))
continue;
if (!decoder_try_decode(plugin, &input_stream))
continue;
ret = plugin->stream_decode(&decoder, &input_stream);
@@ -123,9 +121,6 @@ static void decoder_run(void)
while ((plugin = decoder_plugin_from_suffix(s, next++))) {
if (plugin->stream_decode == NULL)
continue;
if (!(plugin->stream_types &
INPUT_PLUGIN_STREAM_URL))
continue;
if (!decoder_try_decode(plugin, &input_stream))
continue;
decoder.plugin = plugin;
@@ -150,9 +145,6 @@ static void decoder_run(void)
unsigned int next = 0;
const char *s = getSuffix(uri);
while ((plugin = decoder_plugin_from_suffix(s, next++))) {
if (!plugin->stream_types & INPUT_PLUGIN_STREAM_FILE)
continue;
if (!decoder_try_decode(plugin, &input_stream))
continue;