X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=pv%2Fdata%2Fdecoderstack.cpp;h=f0bdd6bd4f6e3556a3777e7cabfea49d06b2acc6;hb=a007f5ad25bad88cf62443d5471449ce8a6f5f29;hp=760d336e14c4dcb65628b2ebb9a8bff31849754e;hpb=caabb84c559023f179bf2c4600a5ebce34eab081;p=pulseview.git diff --git a/pv/data/decoderstack.cpp b/pv/data/decoderstack.cpp index 760d336e..f0bdd6bd 100644 --- a/pv/data/decoderstack.cpp +++ b/pv/data/decoderstack.cpp @@ -143,6 +143,14 @@ void DecoderStack::begin_decode() void DecoderStack::clear() { + _annotations.clear(); +} + +uint64_t DecoderStack::get_max_sample_count() const +{ + if (_annotations.empty()) + return 0; + return _annotations.back()->end_sample(); } void DecoderStack::decode_proc(shared_ptr data)