mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-26 05:21:00 +00:00
ffv1dec: Drop decoder state before calling VideoDecoder::negotiate()
It calls into other elements via the allocation query and the caps event, which makes it dangerous to keep a mutex locked at the same time.
This commit is contained in:
parent
4c8c398aa4
commit
fd1c0a7518
1 changed files with 6 additions and 4 deletions
|
@ -304,15 +304,17 @@ impl VideoDecoderImpl for Ffv1Dec {
|
||||||
|
|
||||||
let output_info = Some(output_state.info());
|
let output_info = Some(output_state.info());
|
||||||
|
|
||||||
element
|
|
||||||
.negotiate(output_state)
|
|
||||||
.map_err(|err| gst::loggable_error!(CAT, "Negotiation failed: {}", err))?;
|
|
||||||
|
|
||||||
let mut decoder_state = self.state.lock().unwrap();
|
let mut decoder_state = self.state.lock().unwrap();
|
||||||
*decoder_state = DecoderState::Started {
|
*decoder_state = DecoderState::Started {
|
||||||
output_info,
|
output_info,
|
||||||
decoder: Box::new(decoder),
|
decoder: Box::new(decoder),
|
||||||
|
video_meta_supported: false,
|
||||||
};
|
};
|
||||||
|
drop(decoder_state);
|
||||||
|
|
||||||
|
element
|
||||||
|
.negotiate(output_state)
|
||||||
|
.map_err(|err| gst::loggable_error!(CAT, "Negotiation failed: {}", err))?;
|
||||||
|
|
||||||
self.parent_set_format(element, state)
|
self.parent_set_format(element, state)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue