From 8a5cb596b2717eb85c0601867f713c3df9bb3383 Mon Sep 17 00:00:00 2001 From: Kostya Shishkov Date: Sat, 24 Feb 2018 15:03:18 +0100 Subject: [PATCH] realmedia: output completed frame in mode 0 --- src/demuxers/realmedia.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/demuxers/realmedia.rs b/src/demuxers/realmedia.rs index f8d5a3e..28e20dc 100644 --- a/src/demuxers/realmedia.rs +++ b/src/demuxers/realmedia.rs @@ -230,7 +230,14 @@ println!(" mode 0 pkt {}/{} off {}/{} seq {}", packet_num, num_pkts, off, frame_ } else { vstr.add_slice(packet_num as usize, self.slice_buf.as_slice()); } - continue; + if (packet_num as usize) < num_pkts { + continue; + } + //todo: check if full frame is received + let (tb_num, tb_den) = stream.get_timebase(); + let ts = NATimeInfo::new(Some(ts as u64), None, None, tb_num, tb_den); + let pkt = NAPacket::new(stream, ts, keyframe, vstr.get_frame_data()); + Ok(pkt) }, 1 => { // whole frame let seq_no = self.src.read_byte()?; -- 2.39.5