sccparse: Ignore invalid timecode during seek as well

sccparse holds last timecode in order to ignore invalid timecode
and fallback to the previous timecode. That should happen
when sccparse is handling seek event too. Otherwise single invalid
timecode before the target seek position will cause flow error.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1485>
This commit is contained in:
Seungha Yang 2024-03-06 02:37:16 +09:00 committed by GStreamer Marge Bot
parent 2839e0078b
commit 237f22d131

View file

@ -381,6 +381,10 @@ impl SccParse {
// Still need to scan lines to find the first buffer
if state.seeking {
// Remember this timecode in order to fallback to this one
// if invalid timecode is detected during scanning
state.last_timecode = Some(timecode);
drop(state);
return Ok(self.state.lock().unwrap());
}