mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-02-15 20:35:16 +00:00
cea608tott: Don't zero-pad SRT indices but zero-pad hours to at least two digits
Zero-padding is not specified for the indices but all time components need to be zero-padded (3 digits for fractional seconds, 2 digits for everything else).
This commit is contained in:
parent
e50686d5db
commit
6744497cf6
1 changed files with 2 additions and 2 deletions
|
@ -233,10 +233,10 @@ impl Cea608ToTt {
|
||||||
let (h1, m1, s1, ms1) = Self::split_time(timestamp);
|
let (h1, m1, s1, ms1) = Self::split_time(timestamp);
|
||||||
let (h2, m2, s2, ms2) = Self::split_time(timestamp + duration);
|
let (h2, m2, s2, ms2) = Self::split_time(timestamp + duration);
|
||||||
|
|
||||||
writeln!(&mut data, "{:02}\r", index).unwrap();
|
writeln!(&mut data, "{}\r", index).unwrap();
|
||||||
writeln!(
|
writeln!(
|
||||||
&mut data,
|
&mut data,
|
||||||
"{}:{:02}:{:02},{:03} --> {:02}:{:02}:{:02},{:03}\r",
|
"{:02}:{:02}:{:02},{:03} --> {:02}:{:02}:{:02},{:03}\r",
|
||||||
h1, m1, s1, ms1, h2, m2, s2, ms2
|
h1, m1, s1, ms1, h2, m2, s2, ms2
|
||||||
)
|
)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
Loading…
Reference in a new issue