X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=pv%2Fdata%2Fdecoderstack.cpp;h=c197e019fd16c6b1e1d5d35ff2aa02d62b9e2bfa;hb=df4c1a0691f6d3a457a475e496186d5a9decc54a;hp=2344804fd1f17d2e2490f83fa6d8df9128084f12;hpb=1c5fb7593d34daeca31148eb48de4ff7a0c6aa05;p=pulseview.git diff --git a/pv/data/decoderstack.cpp b/pv/data/decoderstack.cpp index 2344804f..c197e019 100644 --- a/pv/data/decoderstack.cpp +++ b/pv/data/decoderstack.cpp @@ -193,6 +193,14 @@ void DecoderStack::begin_decode() clear(); + // Check that all decoders have the required probes + BOOST_FOREACH(const shared_ptr &dec, _stack) + if (!dec->have_required_probes()) { + _error_message = tr("One or more required probes " + "have not been specified"); + return; + } + // Add classes BOOST_FOREACH (const shared_ptr &dec, _stack) { @@ -249,8 +257,7 @@ void DecoderStack::begin_decode() if (_samplerate == 0.0) _samplerate = 1.0; - _decode_thread = boost::thread(&DecoderStack::decode_proc, this, - data); + _decode_thread = boost::thread(&DecoderStack::decode_proc, this); } uint64_t DecoderStack::get_max_sample_count() const @@ -312,7 +319,7 @@ void DecoderStack::decode_data( new_decode_data(); } -void DecoderStack::decode_proc(shared_ptr data) +void DecoderStack::decode_proc() { optional sample_count; srd_session *session; @@ -321,11 +328,6 @@ void DecoderStack::decode_proc(shared_ptr data) assert(data); assert(_snapshot); - // Check that all decoders have the required probes - BOOST_FOREACH(const shared_ptr &dec, _stack) - if (!dec->have_required_probes()) - return; - // Create the session srd_session_new(&session); assert(session);