projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix #615 by opening the output stream only if needed
[pulseview.git]
/
pv
/
session.cpp
diff --git
a/pv/session.cpp
b/pv/session.cpp
index b5d7911fede86af41f8e17e2914bd52a875691db..2bd3a054038f846d2263a26caf3ee124422f9293 100644
(file)
--- a/
pv/session.cpp
+++ b/
pv/session.cpp
@@
-179,6
+179,10
@@
void Session::start_capture(function<void (const QString)> error_handler)
}
}
}
}
+ // Clear signal data
+ for (const shared_ptr<data::SignalData> d : get_data())
+ d->clear();
+
// Begin the session
sampling_thread_ = std::thread(
&Session::sample_thread_proc, this, device_,
// Begin the session
sampling_thread_ = std::thread(
&Session::sample_thread_proc, this, device_,
@@
-233,9
+237,9
@@
bool Session::add_decoder(srd_decoder *const dec)
// Make a list of all the channels
std::vector<const srd_channel*> all_channels;
// Make a list of all the channels
std::vector<const srd_channel*> all_channels;
- for(const GSList *i = dec->channels; i; i = i->next)
+ for
(const GSList *i = dec->channels; i; i = i->next)
all_channels.push_back((const srd_channel*)i->data);
all_channels.push_back((const srd_channel*)i->data);
- for(const GSList *i = dec->opt_channels; i; i = i->next)
+ for
(const GSList *i = dec->opt_channels; i; i = i->next)
all_channels.push_back((const srd_channel*)i->data);
// Auto select the initial channels
all_channels.push_back((const srd_channel*)i->data);
// Auto select the initial channels
@@
-297,7
+301,7
@@
void Session::set_capture_state(capture_state state)
lock_guard<mutex> lock(sampling_mutex_);
const bool changed = capture_state_ != state;
capture_state_ = state;
lock_guard<mutex> lock(sampling_mutex_);
const bool changed = capture_state_ != state;
capture_state_ = state;
- if(changed)
+ if
(changed)
capture_state_changed(state);
}
capture_state_changed(state);
}