Commit 48089394 authored by Max Kellermann's avatar Max Kellermann

test/read_tags: use AtScopeExit()

parent 30bd190b
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include "fs/Path.hxx" #include "fs/Path.hxx"
#include "thread/Cond.hxx" #include "thread/Cond.hxx"
#include "Log.hxx" #include "Log.hxx"
#include "util/ScopeExit.hxx"
#include <stdexcept> #include <stdexcept>
...@@ -89,7 +90,10 @@ try { ...@@ -89,7 +90,10 @@ try {
const ScopeIOThread io_thread; const ScopeIOThread io_thread;
input_stream_global_init(); input_stream_global_init();
AtScopeExit() { input_stream_global_finish(); };
decoder_plugin_init_all(); decoder_plugin_init_all();
AtScopeExit() { decoder_plugin_deinit_all(); };
plugin = decoder_plugin_from_name(decoder_name); plugin = decoder_plugin_from_name(decoder_name);
if (plugin == NULL) { if (plugin == NULL) {
...@@ -107,9 +111,6 @@ try { ...@@ -107,9 +111,6 @@ try {
success = plugin->ScanStream(*is, print_handler, nullptr); success = plugin->ScanStream(*is, print_handler, nullptr);
} }
decoder_plugin_deinit_all();
input_stream_global_finish();
if (!success) { if (!success) {
fprintf(stderr, "Failed to read tags\n"); fprintf(stderr, "Failed to read tags\n");
return EXIT_FAILURE; return EXIT_FAILURE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment