]> git.nihav.org Git - nihav.git/commitdiff
realmedia: output completed frame in mode 0
authorKostya Shishkov <kostya.shishkov@gmail.com>
Sat, 24 Feb 2018 14:03:18 +0000 (15:03 +0100)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Sat, 24 Feb 2018 17:35:29 +0000 (18:35 +0100)
src/demuxers/realmedia.rs

index f8d5a3e342825511c03056c8235bd59fa628a6e8..28e20dc9767ac55b1f512dd6426f5e541a42d9b6 100644 (file)
@@ -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()?;