]> sigrok.org Git - pulseview.git/commitdiff
DecodeSignal: Process late annotations which are sent upon EOF
authorGerhard Sittig <redacted>
Mon, 3 Oct 2022 19:10:40 +0000 (21:10 +0200)
committerSoeren Apel <redacted>
Sat, 8 Oct 2022 18:59:26 +0000 (20:59 +0200)
When protocol decoders learn about the end of the input data, they may
emit more annotations before their operation terminates or gets reset
and re-fed. Do process these late annotations in the application, too.
Without this change, the last annotations are not seen. See bug #292
for an example.

pv/data/decodesignal.cpp

index 01d5f27831263af5461c7c423e303af24d67fe6a..f4d4c7da80ed79564216efcf8fc4786914095510 100644 (file)
@@ -1376,8 +1376,13 @@ void DecodeSignal::decode_proc()
                        // If the input segment is complete, we've exhausted this segment
                        if (input_segment->is_complete()) {
 #if defined HAVE_SRD_SESSION_SEND_EOF && HAVE_SRD_SESSION_SEND_EOF
+                               // Tell protocol decoders about the end of
+                               // the input data, which may result in more
+                               // annotations being emitted
                                (void)srd_session_send_eof(srd_session_);
+                               new_annotations();
 #endif
+
                                if (current_segment_id_ < (logic_mux_data_->logic_segments().size() - 1)) {
                                        // Process next segment
                                        current_segment_id_++;