X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=futatabi%2Fmain.cpp;h=7c5f660ae5b97f928aed6b9c8daabe18a5744cc4;hb=c664eca0541eb9e813c0ead7fa596200eb51b45b;hp=0ef51be546de44cc3e27ab78ec9cb657deee11ef;hpb=f16a3d114562ca32e9416948a245905ca34465ee;p=nageru diff --git a/futatabi/main.cpp b/futatabi/main.cpp index 0ef51be..7c5f660 100644 --- a/futatabi/main.cpp +++ b/futatabi/main.cpp @@ -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(); @@ -529,8 +535,10 @@ void record_thread_func() current_pts = pts; } - fprintf(stderr, "%s: Hit EOF. Waiting one second and trying again...\n", global_flags.stream_source.c_str()); - sleep(1); + if (!should_quit.load()) { + fprintf(stderr, "%s: Hit EOF. Waiting one second and trying again...\n", global_flags.stream_source.c_str()); + sleep(1); + } start_pts = last_pts + TIMEBASE; }