From ad83f8faadeded7902eb3e25b608f45674b86fa0 Mon Sep 17 00:00:00 2001 From: Soeren Apel Date: Wed, 29 Jul 2015 21:28:17 +0200 Subject: [PATCH] StoreSession: Supply filename to the output module directly This fixes parts of bug #570. --- pv/storesession.cpp | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/pv/storesession.cpp b/pv/storesession.cpp index 1a27e565..bf214554 100644 --- a/pv/storesession.cpp +++ b/pv/storesession.cpp @@ -137,17 +137,10 @@ bool StoreSession::start() map options = options_; - // If the output has the capability to write files, use it. - // Otherwise, open the output stream. - const auto opt_list = output_format_->options(); - if (opt_list.find("filename") != opt_list.end()) - options["filename"] = - Glib::Variant::create(file_name_); - else - output_stream_.open(file_name_, ios_base::binary | - ios_base::trunc | ios_base::out); - - output_ = output_format_->create_output(device, options); + output_stream_.open(file_name_, ios_base::binary | + ios_base::trunc | ios_base::out); + + output_ = output_format_->create_output(file_name_, device, options); auto meta = context->create_meta_packet( {{ConfigKey::SAMPLERATE, Glib::Variant::create( segment->samplerate())}}); -- 2.30.2