Fix bug added with clippy refactor

This commit is contained in:
Ruben Gonzalez 2018-09-21 20:11:54 +02:00
parent 440a353f93
commit 02f3b84bb3
2 changed files with 5 additions and 4 deletions

View file

@ -375,9 +375,10 @@ impl BaseSrcImpl<BaseSrc> for NdiAudioSrc {
buffer.set_pts(pts + ndi_struct.start_pts);
buffer.set_duration(duration);
//TODO fix audio offset
buffer.set_offset(timestamp_data.offset);
buffer.set_offset_end(timestamp_data.offset + 1);
timestamp_data.offset += timestamp_data.offset;
timestamp_data.offset += 1;
buffer.set_offset_end(timestamp_data.offset);
buffer.copy_from_slice(0, &vec).unwrap();
}

View file

@ -384,8 +384,8 @@ impl BaseSrcImpl<BaseSrc> for NdiVideoSrc {
buffer.set_pts(pts + ndi_struct.start_pts);
buffer.set_duration(duration);
buffer.set_offset(timestamp_data.offset);
buffer.set_offset_end(timestamp_data.offset + 1);
timestamp_data.offset += timestamp_data.offset;
timestamp_data.offset += 1;
buffer.set_offset_end(timestamp_data.offset);
buffer.copy_from_slice(0, &vec).unwrap();
}