mirror of
https://github.com/DreamSourceLab/DSView.git
synced 2025-01-23 13:42:55 +08:00
Do not add decode task when the collect task is not end
This commit is contained in:
parent
ede017bfb4
commit
3358e89948
@ -560,6 +560,11 @@ void DecoderStack::decode_data(const uint64_t decode_start, const uint64_t decod
|
||||
|
||||
uint64_t align_sample_count = _snapshot->get_ring_sample_count();
|
||||
|
||||
if (align_sample_count == 0){
|
||||
dsv_info("Have no data to decode.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (end_index >= align_sample_count){
|
||||
end_index = align_sample_count - 1;
|
||||
dsv_info("Reset the decode end sample, new:%llu, old:%llu",
|
||||
|
@ -1688,7 +1688,15 @@ namespace pv
|
||||
{
|
||||
auto trace = get_decoder_trace(index);
|
||||
|
||||
if (trace && trace->create_popup(false))
|
||||
if (trace == NULL){
|
||||
return;
|
||||
}
|
||||
|
||||
if (!trace->create_popup(false)){
|
||||
return;
|
||||
}
|
||||
|
||||
if (have_view_data() && !is_working())
|
||||
{
|
||||
remove_decode_task(trace); // remove old task
|
||||
trace->decoder()->clear();
|
||||
@ -1868,8 +1876,7 @@ namespace pv
|
||||
std::lock_guard<std::mutex> lock(_decode_task_mutex);
|
||||
_decode_tasks.push_back(trace);
|
||||
|
||||
if (!_is_decoding)
|
||||
{
|
||||
if (!_is_decoding){
|
||||
if (_decode_thread.joinable())
|
||||
_decode_thread.join();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user