check end PTS only for packets that are decoded
authorKostya Shishkov <kostya.shishkov@gmail.com>
Tue, 24 Mar 2020 13:48:27 +0000 (14:48 +0100)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Tue, 24 Mar 2020 13:48:27 +0000 (14:48 +0100)
src/main.rs

index 71ccda6..bb6a7bc 100644 (file)
@@ -237,8 +237,8 @@ panic!("decoder {} not found", info.get_name());
                     break;
                 },
             };
+            if pkt.get_pts() != None && lastpts.is_some() && pkt.get_pts() >= lastpts { break; }
         }
-        if pkt.get_pts() != None && lastpts.is_some() && pkt.get_pts() >= lastpts { break; }
     }
 //panic!("end");
 }