aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-11-07 17:58:52 +0100
committerMax Kellermann <max@duempel.org>2009-11-07 17:58:52 +0100
commit9b21152600071ec46c021c8ba3b2ef69c90f039f (patch)
tree1f9073ebb6764caa293ccef380fb43a5993b440b
parentc440faa94dad1a9d7cae4947351a2704a9975cd9 (diff)
downloadmpd-9b21152600071ec46c021c8ba3b2ef69c90f039f.tar.gz
mpd-9b21152600071ec46c021c8ba3b2ef69c90f039f.tar.xz
mpd-9b21152600071ec46c021c8ba3b2ef69c90f039f.zip
decoder_thread: close input file
An input_stream_close() call was missing after today's code reorganization.
-rw-r--r--src/decoder_thread.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/decoder_thread.c b/src/decoder_thread.c
index 95dbf8d75..9c12ecb07 100644
--- a/src/decoder_thread.c
+++ b/src/decoder_thread.c
@@ -257,6 +257,7 @@ decoder_run_file(struct decoder *decoder, const char *path_fs)
decoder_unlock(dc);
} else if (plugin->stream_decode != NULL) {
struct input_stream input_stream;
+ bool success;
if (!decoder_input_stream_open(dc, &input_stream,
path_fs))
@@ -264,11 +265,17 @@ decoder_run_file(struct decoder *decoder, const char *path_fs)
decoder_lock(dc);
- if (decoder_stream_decode(plugin, decoder,
- &input_stream))
- return true;
+ success = decoder_stream_decode(plugin, decoder,
+ &input_stream);
decoder_unlock(dc);
+
+ input_stream_close(&input_stream);
+
+ if (success) {
+ decoder_lock(dc);
+ return true;
+ }
}
}