diff options
author | Jordan Petridis <jordan@centricular.com> | 2019-01-26 02:41:12 +0300 |
---|---|---|
committer | Jordan Petridis <jpetridis@gnome.org> | 2019-02-07 15:31:35 +0300 |
commit | 23071c1e0eb9f37732e307ea9a7aa2c0dfc83aad (patch) | |
tree | 85defec33ca454844c2a88f47f869f5c0795de93 | |
parent | 01911b0ca7630d2f3c0ca3a37e2a38d7dffb5cfa (diff) |
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.
-rw-r--r-- | gst-plugin-closedcaption/src/mcc_parse.rs | 3 |
1 files changed, 3 insertions, 0 deletions
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); |