let (buf, pts, duration) = self.read_frame()?;
let stream = strmgr.get_stream(0).unwrap();
- let (tb_num, tb_den) = stream.get_timebase();
- let ts = NATimeInfo::new(Some(pts), None, Some(duration), tb_num, tb_den);
+ let ts = stream.make_ts(Some(pts), None, Some(duration));
let pkt = NAPacket::new(stream, ts, true, buf);
Ok(pkt)
#[test]
fn test_flac_demux() {
+ // sample: https://samples.mplayerhq.hu/A-codecs/lossless/luckynight.flac
let mut file = File::open("assets/LLaudio/luckynight.flac").unwrap();
let mut fr = FileReader::new_read(&mut file);
let mut br = ByteReader::new(&mut fr);