mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-29 21:11:14 +00:00
gstreamer: Fix build with serde feature enabled
This commit is contained in:
parent
004ce5d392
commit
37071c9d60
1 changed files with 4 additions and 7 deletions
|
@ -49,18 +49,15 @@ impl From<SampleDe> for Sample {
|
|||
fn from(mut buf_de: SampleDe) -> Self {
|
||||
if buf_de.buffer.is_some() {
|
||||
Sample::new::<GenericFormattedValue>(
|
||||
buf_de.buffer.as_ref().map(|buffer| buffer.as_ref()),
|
||||
buf_de.caps.as_ref().map(|caps| caps.as_ref()),
|
||||
buf_de.buffer.as_ref(),
|
||||
buf_de.caps.as_ref(),
|
||||
buf_de.segment.as_ref(),
|
||||
buf_de.info.take(),
|
||||
)
|
||||
} else {
|
||||
Sample::with_buffer_list::<GenericFormattedValue>(
|
||||
buf_de
|
||||
.buffer_list
|
||||
.as_ref()
|
||||
.map(|buffer_list| buffer_list.as_ref()),
|
||||
buf_de.caps.as_ref().map(|caps| caps.as_ref()),
|
||||
buf_de.buffer_list.as_ref(),
|
||||
buf_de.caps.as_ref(),
|
||||
buf_de.segment.as_ref(),
|
||||
buf_de.info.take(),
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue