diff --git a/src/ndiaudiosrc.rs b/src/ndiaudiosrc.rs index fe8db62a..34eb0934 100644 --- a/src/ndiaudiosrc.rs +++ b/src/ndiaudiosrc.rs @@ -375,9 +375,8 @@ impl BaseSrcImpl for NdiAudioSrc { buffer.set_pts(pts + ndi_struct.start_pts); buffer.set_duration(duration); - //TODO fix audio offset buffer.set_offset(timestamp_data.offset); - timestamp_data.offset += 1; + timestamp_data.offset += audio_frame.no_samples as u64/audio_frame.no_channels as u64; buffer.set_offset_end(timestamp_data.offset); buffer.copy_from_slice(0, &vec).unwrap(); }