From: Soeren Apel Date: Wed, 29 Jul 2015 19:28:17 +0000 (+0200) Subject: StoreSession: Supply filename to the output module directly X-Git-Tag: pulseview-0.3.0~157 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=ad83f8faadeded7902eb3e25b608f45674b86fa0;p=pulseview.git StoreSession: Supply filename to the output module directly This fixes parts of bug #570. --- 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())}});