From 9b21152600071ec46c021c8ba3b2ef69c90f039f Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 7 Nov 2009 17:58:52 +0100 Subject: decoder_thread: close input file An input_stream_close() call was missing after today's code reorganization. --- src/decoder_thread.c | 13 ++++++++++--- 1 file 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; + } } } -- cgit v1.2.3