]> git.sesse.net Git - nageru/commitdiff
Add some asserts to guard against nonsensical start pts.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 9 Mar 2019 19:40:11 +0000 (20:40 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 9 Mar 2019 19:40:11 +0000 (20:40 +0100)
futatabi/main.cpp

index 0ef51be546de44cc3e27ab78ec9cb657deee11ef..9585dd4e4b3180201cd8d210187d4cf697114724 100644 (file)
@@ -255,6 +255,12 @@ int main(int argc, char **argv)
 
        load_existing_frames();
 
+       for (int stream_idx = 0; stream_idx < MAX_STREAMS; ++stream_idx) {
+               if (!frames[stream_idx].empty()) {
+                       assert(start_pts > frames[stream_idx].back().pts);
+               }
+       }
+
        MainWindow main_window;
        main_window.show();