projects
/
pulseview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
692f609
)
DecodeSignal: Fix restarting the decode after reloading file
author
Soeren Apel
<soeren@apelpie.net>
Sun, 21 May 2017 17:59:59 +0000
(19:59 +0200)
committer
Uwe Hermann
<uwe@hermann-uwe.de>
Wed, 5 Jul 2017 22:37:08 +0000
(
00:37
+0200)
pv/data/decodesignal.cpp
patch
|
blob
|
history
diff --git
a/pv/data/decodesignal.cpp
b/pv/data/decodesignal.cpp
index 4c8548fc8280fb8bf564e0cc98221de1aac41505..37956889e8554624139a26aebd74c90f484f750d 100644
(file)
--- a/
pv/data/decodesignal.cpp
+++ b/
pv/data/decodesignal.cpp
@@
-605,12
+605,12
@@
void DecodeSignal::logic_mux_proc()
} while (processed_samples < samples_to_process);
}
} while (processed_samples < samples_to_process);
}
- if (s
ession_.get_capture_state() != Session::Stopped
) {
+ if (s
amples_to_process == 0
) {
// Wait for more input
unique_lock<mutex> logic_mux_lock(logic_mux_mutex_);
logic_mux_cond_.wait(logic_mux_lock);
}
// Wait for more input
unique_lock<mutex> logic_mux_lock(logic_mux_mutex_);
logic_mux_cond_.wait(logic_mux_lock);
}
- } while (
(session_.get_capture_state() != Session::Stopped) &&
!logic_mux_interrupt_);
+ } while (!logic_mux_interrupt_);
// No more input data and session is stopped, let the decode thread
// process any pending data, terminate and release the global SRD mutex
// No more input data and session is stopped, let the decode thread
// process any pending data, terminate and release the global SRD mutex
@@
-643,9
+643,11
@@
void DecodeSignal::query_input_metadata()
samplerate_valid = true;
}
samplerate_valid = true;
}
- // Wait until input data is available or an interrupt was requested
- unique_lock<mutex> input_wait_lock(input_mutex_);
- decode_input_cond_.wait(input_wait_lock);
+ if (!samplerate_valid) {
+ // Wait until input data is available or an interrupt was requested
+ unique_lock<mutex> input_wait_lock(input_mutex_);
+ decode_input_cond_.wait(input_wait_lock);
+ }
} while (!samplerate_valid && !decode_interrupt_);
}
} while (!samplerate_valid && !decode_interrupt_);
}