pub fn pts_to_secs(pts: i64, start_time: i64, time_base: ffmpeg::Rational) -> f64 {
    (pts - start_time) as f64 * rational_to_f64(time_base)
}

pub fn rational_to_f64(r: ffmpeg::Rational) -> f64 {
    r.0 as f64 / r.1 as f64
}
