]> sigrok.org Git - pulseview.git/commitdiff
DecodeSignal: When lacking input, retry only when data is available
authorSoeren Apel <redacted>
Sat, 21 Apr 2018 09:09:11 +0000 (11:09 +0200)
committerSoeren Apel <redacted>
Sat, 21 Apr 2018 09:10:51 +0000 (11:10 +0200)
pv/data/decodesignal.cpp

index f7057d06e07cef8ecf6d232ee48308ffcab47de4..8483d91d0ce4a2b41de67a07605d2a757d761137 100644 (file)
@@ -1199,6 +1199,12 @@ void DecodeSignal::on_data_cleared()
 
 void DecodeSignal::on_data_received()
 {
+       // If we detected a lack of input data when trying to start decoding,
+       // we have set an error message. Only try again if we now have data
+       // to work with
+       if ((!error_message_.isEmpty()) && (get_input_segment_count() == 0))
+               return;
+
        if (!logic_mux_thread_.joinable())
                begin_decode();
        else