mirror of
https://github.com/DreamSourceLab/DSView.git
synced 2025-01-23 13:42:55 +08:00
fix: Failed to decode data on loop mode
This commit is contained in:
parent
46af942db8
commit
85c5a18ce7
@ -546,10 +546,10 @@ void DecoderStack::decode_data(const uint64_t decode_start, const uint64_t decod
|
|||||||
if (!bCheckEnd){
|
if (!bCheckEnd){
|
||||||
bCheckEnd = true;
|
bCheckEnd = true;
|
||||||
|
|
||||||
uint64_t mipmap_sample_count = _snapshot->get_ring_sample_count();
|
uint64_t align_sample_count = _snapshot->get_ring_sample_count();
|
||||||
|
|
||||||
if (end_index >= mipmap_sample_count){
|
if (end_index >= align_sample_count){
|
||||||
end_index = mipmap_sample_count - 1;
|
end_index = align_sample_count - 1;
|
||||||
dsv_info("Reset the decode end sample, new:%llu, old:%llu", end_index, decode_end);
|
dsv_info("Reset the decode end sample, new:%llu, old:%llu", end_index, decode_end);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -603,7 +603,7 @@ void DecoderStack::decode_data(const uint64_t decode_start, const uint64_t decod
|
|||||||
if (chunk_end - i > MaxChunkSize)
|
if (chunk_end - i > MaxChunkSize)
|
||||||
chunk_end = i + MaxChunkSize;
|
chunk_end = i + MaxChunkSize;
|
||||||
|
|
||||||
bEndTime = chunk_end == end_index;
|
bEndTime = (chunk_end == end_index);
|
||||||
|
|
||||||
if (srd_session_send(
|
if (srd_session_send(
|
||||||
session,
|
session,
|
||||||
@ -614,8 +614,12 @@ void DecoderStack::decode_data(const uint64_t decode_start, const uint64_t decod
|
|||||||
chunk_end - i,
|
chunk_end - i,
|
||||||
&error) != SRD_OK){
|
&error) != SRD_OK){
|
||||||
|
|
||||||
if (error)
|
if (error){
|
||||||
_error_message = QString::fromLocal8Bit(error);
|
_error_message = QString::fromLocal8Bit(error);
|
||||||
|
dsv_err("Failed to call srd_session_send:%s", error);
|
||||||
|
g_free(error);
|
||||||
|
error = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
bError = true;
|
bError = true;
|
||||||
break;
|
break;
|
||||||
@ -649,8 +653,10 @@ void DecoderStack::decode_data(const uint64_t decode_start, const uint64_t decod
|
|||||||
if (!bError && bEndTime){
|
if (!bError && bEndTime){
|
||||||
srd_session_end(session, &error);
|
srd_session_end(session, &error);
|
||||||
|
|
||||||
if (error != NULL)
|
if (error != NULL){
|
||||||
_error_message = QString::fromLocal8Bit(error);
|
_error_message = QString::fromLocal8Bit(error);
|
||||||
|
dsv_err("Failed to call srd_session_end:%s", error);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dsv_info("%s%llu", "send to decoder times: ", entry_cnt);
|
dsv_info("%s%llu", "send to decoder times: ", entry_cnt);
|
||||||
|
@ -600,7 +600,6 @@ const uint8_t *LogicSnapshot::get_samples(uint64_t start_sample, uint64_t &end_s
|
|||||||
|
|
||||||
end_sample = min(end_sample + 1, sample_count);
|
end_sample = min(end_sample + 1, sample_count);
|
||||||
|
|
||||||
end_sample -= _loop_offset;
|
|
||||||
_ring_sample_count -= _loop_offset;
|
_ring_sample_count -= _loop_offset;
|
||||||
|
|
||||||
if (order == -1 || _ch_data[order][index0].lbp[index1] == NULL)
|
if (order == -1 || _ch_data[order][index0].lbp[index1] == NULL)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user