mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-29 04:51:09 +00:00
audio/audio-buffer: Use correct pointer for the audio buffer plane data
This commit is contained in:
parent
4f5b2f5060
commit
f8301ea9ce
1 changed files with 4 additions and 4 deletions
|
@ -118,7 +118,7 @@ impl<T> AudioBuffer<T> {
|
|||
|
||||
unsafe {
|
||||
Ok(slice::from_raw_parts(
|
||||
self.audio_buffer.planes.add(plane as usize) as *const u8,
|
||||
(*self.audio_buffer.planes.add(plane as usize)) as *const u8,
|
||||
self.plane_size(),
|
||||
))
|
||||
}
|
||||
|
@ -227,7 +227,7 @@ impl AudioBuffer<Writable> {
|
|||
|
||||
unsafe {
|
||||
Ok(slice::from_raw_parts_mut(
|
||||
self.audio_buffer.planes.add(plane as usize) as *mut u8,
|
||||
(*self.audio_buffer.planes.add(plane as usize)) as *mut u8,
|
||||
self.plane_size(),
|
||||
))
|
||||
}
|
||||
|
@ -348,7 +348,7 @@ impl<T> AudioBufferRef<T> {
|
|||
|
||||
unsafe {
|
||||
Ok(slice::from_raw_parts(
|
||||
self.audio_buffer.planes.add(plane as usize) as *const u8,
|
||||
(*self.audio_buffer.planes.add(plane as usize)) as *const u8,
|
||||
self.plane_size(),
|
||||
))
|
||||
}
|
||||
|
@ -479,7 +479,7 @@ impl<'a> AudioBufferRef<&'a mut gst::BufferRef> {
|
|||
|
||||
unsafe {
|
||||
Ok(slice::from_raw_parts_mut(
|
||||
self.audio_buffer.planes.add(plane as usize) as *mut u8,
|
||||
(*self.audio_buffer.planes.add(plane as usize)) as *mut u8,
|
||||
self.plane_size(),
|
||||
))
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue