jitterbuffer: return NoPreroll when going from READY to PAUSED

This is useful when upstream is not a live source

Fixes potential issue discussed in:

https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/issues/93#note_388528
This commit is contained in:
Mathieu Duponchelle 2020-01-21 18:34:02 +01:00
parent 1823ca525e
commit 0aa5b15564

View file

@ -1373,7 +1373,13 @@ impl ElementImpl for JitterBuffer {
_ => (),
}
self.parent_change_state(element, transition)
let mut ret = self.parent_change_state(element, transition)?;
if transition == gst::StateChange::ReadyToPaused {
ret = gst::StateChangeSuccess::NoPreroll;
}
Ok(ret)
}
}