aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKostya Shishkov <kostya.shishkov@gmail.com>2023-03-01 18:22:54 +0100
committerKostya Shishkov <kostya.shishkov@gmail.com>2023-03-01 18:22:54 +0100
commit951a626bb478d30a69e3b7ac7f76edfbb5db44aa (patch)
treecbfb557103bac7d400cac1c2de62325165012e54
parent0d9dc164b091428c4d23637c4996c430bbc09f2c (diff)
downloadnihav-951a626bb478d30a69e3b7ac7f76edfbb5db44aa.tar.gz
realmedia: clear non-existing timestamps in .ra
-rw-r--r--nihav-realmedia/src/demuxers/realmedia.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/nihav-realmedia/src/demuxers/realmedia.rs b/nihav-realmedia/src/demuxers/realmedia.rs
index 14183c9..b2ea958 100644
--- a/nihav-realmedia/src/demuxers/realmedia.rs
+++ b/nihav-realmedia/src/demuxers/realmedia.rs
@@ -1247,7 +1247,8 @@ impl<'a> DemuxCore<'a> for RealAudioDemuxer<'a> {
fn get_frame(&mut self, strmgr: &mut StreamManager) -> DemuxerResult<NAPacket> {
if !self.queued_pkts.is_empty() {
- let pkt = self.queued_pkts.pop().unwrap();
+ let mut pkt = self.queued_pkts.pop().unwrap();
+ pkt.ts.pts = None;
return Ok(pkt);
}
if (self.data_end != 0) && (self.src.tell() >= self.data_end) {
@@ -1257,10 +1258,13 @@ impl<'a> DemuxCore<'a> for RealAudioDemuxer<'a> {
let stream = streamres.unwrap();
if let Some(ref mut astr) = self.stream {
loop {
- let ret = astr.read_apackets(&mut self.queued_pkts, self.src, stream.clone(), 0, false, self.blk_size);
+ let mut ret = astr.read_apackets(&mut self.queued_pkts, self.src, stream.clone(), 0, false, self.blk_size);
if let Err(DemuxerError::TryAgain) = ret {
continue;
}
+ if let Ok(ref mut pkt) = ret {
+ pkt.ts.pts = None;
+ }
return ret;
}
}