mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2025-06-07 16:08:56 +00:00
video: Return NotNegotiated if setting the output state fails
This commit is contained in:
parent
2d5b6de590
commit
4c52996fc8
2 changed files with 3 additions and 3 deletions
|
@ -241,7 +241,7 @@ impl<O: IsA<VideoDecoder>> VideoDecoderExtManual for O {
|
||||||
};
|
};
|
||||||
|
|
||||||
if state.is_null() {
|
if state.is_null() {
|
||||||
Err(gst::FlowError::Error)
|
Err(gst::FlowError::NotNegotiated)
|
||||||
} else {
|
} else {
|
||||||
unsafe { Ok(VideoCodecState::<InNegotiation>::new(state, self.as_ref())) }
|
unsafe { Ok(VideoCodecState::<InNegotiation>::new(state, self.as_ref())) }
|
||||||
}
|
}
|
||||||
|
@ -272,7 +272,7 @@ impl<O: IsA<VideoDecoder>> VideoDecoderExtManual for O {
|
||||||
};
|
};
|
||||||
|
|
||||||
if state.is_null() {
|
if state.is_null() {
|
||||||
Err(gst::FlowError::Error)
|
Err(gst::FlowError::NotNegotiated)
|
||||||
} else {
|
} else {
|
||||||
unsafe { Ok(VideoCodecState::<InNegotiation>::new(state, self.as_ref())) }
|
unsafe { Ok(VideoCodecState::<InNegotiation>::new(state, self.as_ref())) }
|
||||||
}
|
}
|
||||||
|
|
|
@ -196,7 +196,7 @@ impl<O: IsA<VideoEncoder>> VideoEncoderExtManual for O {
|
||||||
};
|
};
|
||||||
|
|
||||||
if state.is_null() {
|
if state.is_null() {
|
||||||
Err(gst::FlowError::Error)
|
Err(gst::FlowError::NotNegotiated)
|
||||||
} else {
|
} else {
|
||||||
unsafe { Ok(VideoCodecState::<InNegotiation>::new(state, self.as_ref())) }
|
unsafe { Ok(VideoCodecState::<InNegotiation>::new(state, self.as_ref())) }
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue