diff --git a/test/dump_playlist.cxx b/test/dump_playlist.cxx index ea3be3a3f..ba973703b 100644 --- a/test/dump_playlist.cxx +++ b/test/dump_playlist.cxx @@ -41,9 +41,9 @@ static void tag_save(FILE *file, const Tag &tag) { StdioOutputStream sos(file); - BufferedOutputStream bos(sos); - tag_save(bos, tag); - bos.Flush(); + WithBufferedOutputStream(sos, [&](auto &bos){ + tag_save(bos, tag); + }); } int main(int argc, char **argv) diff --git a/test/run_input.cxx b/test/run_input.cxx index d5648f11a..4c067fb45 100644 --- a/test/run_input.cxx +++ b/test/run_input.cxx @@ -124,9 +124,9 @@ static void tag_save(FILE *file, const Tag &tag) { StdioOutputStream sos(file); - BufferedOutputStream bos(sos); - tag_save(bos, tag); - bos.Flush(); + WithBufferedOutputStream(sos, [&](auto &bos){ + tag_save(bos, tag); + }); } static int