Fix "Branch condition evaluates to a garbage value"
in PBD::RingBuffer, vec.buf[1] is not set when vec.len[1] == 0
This commit is contained in:
parent
6edbc21929
commit
b18533119b
@ -236,7 +236,7 @@ FFMPEGFileImportableSource::did_read_data (std::string data, size_t size)
|
|||||||
samplecnt_t written = 0;
|
samplecnt_t written = 0;
|
||||||
for (int i = 0; i < 2; ++i) {
|
for (int i = 0; i < 2; ++i) {
|
||||||
samplecnt_t cnt = std::min<samplecnt_t> (n_samples, wv.len[i]);
|
samplecnt_t cnt = std::min<samplecnt_t> (n_samples, wv.len[i]);
|
||||||
if (!cnt || !wv.buf[i]) {
|
if (!cnt) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
memcpy (wv.buf[i], cur, cnt * sizeof (float));
|
memcpy (wv.buf[i], cur, cnt * sizeof (float));
|
||||||
|
Loading…
Reference in New Issue
Block a user