onvifmetadataparse: Start source pad task on StreamStart if needed

Otherwise receiving StreamStart after Eos might keep the source pad task
paused and no new data is ever pushed downstream.
This commit is contained in:
Sebastian Dröge 2022-09-23 12:46:16 +03:00
parent 86a19e3765
commit c4d2f4a60a

View file

@ -859,6 +859,11 @@ impl OnvifMetadataParse {
let mut state = self.state.lock().unwrap();
match ev {
gst::EventView::StreamStart(_) => {
// Start task again if needed in case we previously went EOS and paused the
// task because of that.
let _ = Self::src_start_task(element, &self.srcpad);
}
gst::EventView::Segment(ev) => {
match ev.segment().downcast_ref::<gst::ClockTime>().cloned() {
Some(mut segment) => {