From f2184db1cd559085abdc98e3942521fdb115077d Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 7 Nov 2009 15:24:38 +0100 Subject: decoder_thread: added local variable "dc" in decoder_run_file() Simplify the expressions. --- src/decoder_thread.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/decoder_thread.c b/src/decoder_thread.c index 1e850a037..a4d599080 100644 --- a/src/decoder_thread.c +++ b/src/decoder_thread.c @@ -210,39 +210,40 @@ decoder_run_stream(struct decoder *decoder, const char *uri) static bool decoder_run_file(struct decoder *decoder, const char *path_fs) { + struct decoder_control *dc = decoder->dc; const char *suffix = uri_get_suffix(path_fs); const struct decoder_plugin *plugin = NULL; if (suffix == NULL) return false; - decoder_unlock(decoder->dc); + decoder_unlock(dc); while ((plugin = decoder_plugin_from_suffix(suffix, plugin)) != NULL) { if (plugin->file_decode != NULL) { - decoder_lock(decoder->dc); + decoder_lock(dc); if (decoder_file_decode(plugin, decoder, path_fs)) return true; - decoder_unlock(decoder->dc); + decoder_unlock(dc); } else if (plugin->stream_decode != NULL) { struct input_stream input_stream; if (!input_stream_open(&input_stream, path_fs)) continue; - decoder_lock(decoder->dc); + decoder_lock(dc); if (decoder_stream_decode(plugin, decoder, &input_stream)) return true; - decoder_unlock(decoder->dc); + decoder_unlock(dc); } } - decoder_lock(decoder->dc); + decoder_lock(dc); return false; } -- cgit v1.2.3