mirror of
https://git.suyu.dev/suyu/Yucom.git
synced 2025-12-22 05:36:09 +01:00
media-converter: Avoid holding state lock.
This commit is contained in:
parent
64465e595f
commit
818cdb7e79
1 changed files with 3 additions and 4 deletions
|
|
@ -728,6 +728,7 @@ impl VideoConv {
|
||||||
true
|
true
|
||||||
},
|
},
|
||||||
QueryViewMut::Duration(ref mut q) => {
|
QueryViewMut::Duration(ref mut q) => {
|
||||||
|
if q.format() != gst::Format::Bytes { return false };
|
||||||
|
|
||||||
let mut state = self.state.lock().unwrap();
|
let mut state = self.state.lock().unwrap();
|
||||||
|
|
||||||
|
|
@ -741,11 +742,9 @@ impl VideoConv {
|
||||||
}
|
}
|
||||||
|
|
||||||
if let Some(sz) = state.our_duration {
|
if let Some(sz) = state.our_duration {
|
||||||
if q.format() == gst::Format::Bytes {
|
|
||||||
q.set(gst::format::Bytes::from_u64(sz));
|
q.set(gst::format::Bytes::from_u64(sz));
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue