From 5d55b45654eacd479a93673f9ec9ad3627952a96 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 7 Nov 2009 15:14:16 +0100 Subject: decoder_list: pass previous plugin pointer to lookup functions Remove the static integer hack, that's not thread safe and sucks. --- src/decoder_list.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/decoder_list.h') diff --git a/src/decoder_list.h b/src/decoder_list.h index 23788189c..3b3cfd040 100644 --- a/src/decoder_list.h +++ b/src/decoder_list.h @@ -26,8 +26,16 @@ struct decoder_plugin; /* interface for using plugins */ +/** + * Find the next enabled decoder plugin which supports the specified suffix. + * + * @param suffix the file name suffix + * @param plugin the previous plugin, or NULL to find the first plugin + * @return a plugin, or NULL if none matches + */ const struct decoder_plugin * -decoder_plugin_from_suffix(const char *suffix, unsigned int next); +decoder_plugin_from_suffix(const char *suffix, + const struct decoder_plugin *plugin); const struct decoder_plugin * decoder_plugin_from_mime_type(const char *mimeType, unsigned int next); -- cgit v1.2.3