mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-01-31 13:12:37 +00:00
sodium: Handle error from Adapter::copy()
This commit is contained in:
parent
6aed1ed926
commit
46651e31c4
1 changed files with 4 additions and 1 deletions
|
@ -218,7 +218,10 @@ impl State {
|
|||
return Err(gst::FlowError::Error);
|
||||
}
|
||||
};
|
||||
self.adapter.copy(0, &mut map[..available_size]);
|
||||
if let Err(_) = self.adapter.copy(0, &mut map[..available_size]) {
|
||||
gst_error!(CAT, obj: pad, "Failed to copy into provided buffer");
|
||||
return Err(gst::FlowError::Error);
|
||||
}
|
||||
if map.len() != available_size {
|
||||
drop(map);
|
||||
buffer.set_size(available_size);
|
||||
|
|
Loading…
Reference in a new issue