1
0
mirror of https://github.com/clementine-player/Clementine synced 2024-12-18 20:34:39 +01:00

Fix pointer arithmetic when seeking buffers

It's possible the sample type will change, so best to not use
a fixed value.
This commit is contained in:
Mark Furneaux 2014-04-30 10:00:58 -04:00
parent 53f21584e4
commit ee7fed36bc

View File

@ -287,7 +287,7 @@ void GstEngine::UpdateScope(int chunk_length_) {
// pass the next chunk of the buffer to the analyser
const sample_type* source =
reinterpret_cast<sample_type*>(GST_BUFFER_DATA(latest_buffer_));
source += (chunk_size / 2 * scope_chunk);
source += (chunk_size / sizeof(sample_type)) * scope_chunk;
sample_type* dest = scope_.data();
const int bytes = qMin(