const int64_t chunk_end = min(i + chunk_sample_count,
abs_start_samplenum + sample_count);
+ // Report this chunk as already decoded so that annotations don't
+ // appear in an area that we claim to not having been been decoded yet
+ {
+ lock_guard<mutex> lock(output_mutex_);
+ segments_.at(current_segment_id_).samples_decoded = chunk_end;
+ }
+
int64_t data_size = (chunk_end - i) * unit_size;
uint8_t* chunk = new uint8_t[data_size];
input_segment->get_samples(i, chunk_end, chunk);
delete[] chunk;
- {
- lock_guard<mutex> lock(output_mutex_);
- segments_.at(current_segment_id_).samples_decoded = chunk_end;
- }
-
// Notify the frontend that we processed some data and
// possibly have new annotations as well
new_annotations();
samples_per_pixel - pixels_offset, left - 1.0);
const double end = min(sample_count / samples_per_pixel -
pixels_offset, right + 1.0);
- const QRectF no_decode_rect(start, y - (h / 2) + 0.5, end - start, h);
+ const QRectF no_decode_rect(start, y - (h / 2) - 0.5, end - start, h);
p.setPen(QPen(Qt::NoPen));
p.setBrush(Qt::white);