fix bug in verify_write_callback_ where the FIFO dequeueing did not memmove all the data

This commit is contained in:
Josh Coalson
2006-11-09 07:06:33 +00:00
parent a586226fda
commit b7b57ef207

View File

@@ -4442,10 +4442,9 @@ FLAC__StreamDecoderWriteStatus verify_write_callback_(const FLAC__StreamDecoder
}
}
/* dequeue the frame from the fifo */
for(channel = 0; channel < channels; channel++) {
memmove(&encoder->private_->verify.input_fifo.data[channel][0], &encoder->private_->verify.input_fifo.data[channel][blocksize], encoder->private_->verify.input_fifo.tail - blocksize);
}
encoder->private_->verify.input_fifo.tail -= blocksize;
for(channel = 0; channel < channels; channel++)
memmove(&encoder->private_->verify.input_fifo.data[channel][0], &encoder->private_->verify.input_fifo.data[channel][blocksize], encoder->private_->verify.input_fifo.tail * sizeof(encoder->private_->verify.input_fifo.data[0][0]));
return FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE;
}