Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parsing for drop frame timecodes can be incorrect #14

Open
beauwright opened this issue May 25, 2024 · 2 comments · May be fixed by #15
Open

Parsing for drop frame timecodes can be incorrect #14

beauwright opened this issue May 25, 2024 · 2 comments · May be fixed by #15

Comments

@beauwright
Copy link

Here's a simple project to show what I've been running into with F29_97_DF and F59_94_DF rates.

use vtc::{rates, Timecode};

fn main() {
    let tc_1 = Timecode::with_frames("01:00:34;01", rates::F29_97_DF).unwrap();

    assert_eq!("01:00:34;01", tc_1.timecode());
}

Running this program results in:

assertion `left == right` failed
  left: "01:00:34;01"
 right: "01:00:34;02"

And if I use a rate of F59_94_DF instead:

assertion `left == right` failed
  left: "01:00:34;01"
 right: "01:00:34;03"
@beauwright
Copy link
Author

I looked into this more and it looks like the problem lies in the drop_frame_adjustment function. I took my own stab at implementing that function based on the pseudocode from David Heidelberger and it seems to work correctly. Would you like me to submit a pull request?

@peake100
Copy link
Contributor

Sure! Go ahead and make a PR!

@peake100 peake100 linked a pull request May 27, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants