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

timing_info_present_flag Support #160

Closed
DoM1niC opened this issue Dec 21, 2024 · 1 comment
Closed

timing_info_present_flag Support #160

DoM1niC opened this issue Dec 21, 2024 · 1 comment

Comments

@DoM1niC
Copy link

DoM1niC commented Dec 21, 2024

relates to bluenviron/mediamtx#3902

I asked ChatGPT for a fix 💯 Can this help you?

I don't have any Golang Skills and hope to find a fix to use the AMD HW AV1 Encoder with Mediamtx 👍🏻

if h.TimingInfoPresentFlag {
    // Beispiel: Verarbeiten der Timing-Informationen
    numUnitsInTick, err := bits.ReadBits(buf, &pos, 32)
    if err != nil {
        return err
    }

    timeScale, err := bits.ReadBits(buf, &pos, 32)
    if err != nil {
        return err
    }

    if numUnitsInTick == 0 || timeScale == 0 {
        return fmt.Errorf("invalid timing info: num_units_in_tick or time_scale is zero")
    }

    // Berechnen der Bildrate
    h.FrameRate = float64(timeScale) / float64(numUnitsInTick)
}
@aler9
Copy link
Member

aler9 commented Dec 21, 2024

Sorry for the question, but do you think we're stupid?

@aler9 aler9 closed this as not planned Won't fix, can't repro, duplicate, stale Dec 21, 2024
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

No branches or pull requests

2 participants