video: Return NotNegotiated if setting the output state fails

This commit is contained in:
Sebastian Dröge 2019-09-13 22:19:53 +03:00
parent 2d5b6de590
commit 4c52996fc8
2 changed files with 3 additions and 3 deletions

View file

@ -241,7 +241,7 @@ impl<O: IsA<VideoDecoder>> VideoDecoderExtManual for O {
};
if state.is_null() {
Err(gst::FlowError::Error)
Err(gst::FlowError::NotNegotiated)
} else {
unsafe { Ok(VideoCodecState::<InNegotiation>::new(state, self.as_ref())) }
}
@ -272,7 +272,7 @@ impl<O: IsA<VideoDecoder>> VideoDecoderExtManual for O {
};
if state.is_null() {
Err(gst::FlowError::Error)
Err(gst::FlowError::NotNegotiated)
} else {
unsafe { Ok(VideoCodecState::<InNegotiation>::new(state, self.as_ref())) }
}

View file

@ -196,7 +196,7 @@ impl<O: IsA<VideoEncoder>> VideoEncoderExtManual for O {
};
if state.is_null() {
Err(gst::FlowError::Error)
Err(gst::FlowError::NotNegotiated)
} else {
unsafe { Ok(VideoCodecState::<InNegotiation>::new(state, self.as_ref())) }
}