Skip to content

Question: Why using Sample.duration to calculate rtp timestamp? #594

@tubzby

Description

@tubzby

https://github.com/webrtc-rs/rtp/blob/ee39d4ea79bd33c01b5b802abdffb183ef586416/src/packetizer/mod.rs#L137

let samples = (sample.duration.as_secs_f64() * clock_rate) as u32;

For each Sample we do have a timestamp field, but to detect the duration we might need 2 samples in which 1 frame lag will be introduced.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions