From 23071c1e0eb9f37732e307ea9a7aa2c0dfc83aad Mon Sep 17 00:00:00 2001 From: Jordan Petridis Date: Sat, 26 Jan 2019 01:41:12 +0200 Subject: mcc_parse: save the last_timecode to have a fallback If the current timecode can't be parsed, the plugin falls back to last knonw timecode to at least have something. The code that does this already existed but the last_timecode was just never set. --- gst-plugin-closedcaption/src/mcc_parse.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gst-plugin-closedcaption/src/mcc_parse.rs b/gst-plugin-closedcaption/src/mcc_parse.rs index 19e0205cb..cb57ddf58 100644 --- a/gst-plugin-closedcaption/src/mcc_parse.rs +++ b/gst-plugin-closedcaption/src/mcc_parse.rs @@ -434,6 +434,9 @@ impl MccParse { state.add_buffer_metadata(element, &mut buffer, &timecode, &framerate); + // Update the last_timecode to the current one + state.last_timecode = Some(timecode); + // Drop our state mutex while we push out buffers or events drop(state); -- cgit v1.2.3