mirror of
https://github.com/ValveSoftware/Proton.git
synced 2024-12-25 06:05:43 +03:00
media-converter: Avoid holding state lock.
This commit is contained in:
parent
64465e595f
commit
818cdb7e79
@ -728,6 +728,7 @@ impl VideoConv {
|
||||
true
|
||||
},
|
||||
QueryViewMut::Duration(ref mut q) => {
|
||||
if q.format() != gst::Format::Bytes { return false };
|
||||
|
||||
let mut state = self.state.lock().unwrap();
|
||||
|
||||
@ -741,10 +742,8 @@ impl VideoConv {
|
||||
}
|
||||
|
||||
if let Some(sz) = state.our_duration {
|
||||
if q.format() == gst::Format::Bytes {
|
||||
q.set(gst::format::Bytes::from_u64(sz));
|
||||
return true
|
||||
}
|
||||
q.set(gst::format::Bytes::from_u64(sz));
|
||||
return true
|
||||
}
|
||||
|
||||
false
|
||||
|
Loading…
Reference in New Issue
Block a user