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 7dfe7c09bd
commit 0868bce87d
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

@ -190,7 +190,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())) }
}