mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-12-23 00:26:31 +00:00
Fix calculation for buffer duration in basic-tutorial-8
We need to scale the number of samples, not the buffer size.
This commit is contained in:
parent
963557b79f
commit
d7792a4fca
1 changed files with 1 additions and 1 deletions
|
@ -164,7 +164,7 @@ fn main() {
|
|||
.mul_div_floor(data.num_samples, SAMPLE_RATE as u64)
|
||||
.expect("u64 overflow");
|
||||
let duration = gst::SECOND
|
||||
.mul_div_floor(CHUNK_SIZE as u64, SAMPLE_RATE as u64)
|
||||
.mul_div_floor(num_samples as u64, SAMPLE_RATE as u64)
|
||||
.expect("u64 overflow");
|
||||
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue