X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=futatabi%2Fmain.cpp;fp=futatabi%2Fmain.cpp;h=3efefd5e94a1a279c751e970fa8b27be69485f16;hb=332647953275fdf1691cded8bbe5d4a8dfe7c675;hp=edff307e38bd1a98584ef3c0a94d1e176f192538;hpb=7c111c0bfbe6bf54cfbce8ad67e0d9b150b3d195;p=nageru diff --git a/futatabi/main.cpp b/futatabi/main.cpp index edff307..3efefd5 100644 --- a/futatabi/main.cpp +++ b/futatabi/main.cpp @@ -183,7 +183,7 @@ FrameOnDisk write_frame(int stream_idx, int64_t pts, const uint8_t *data, size_t HTTPD *global_httpd; void load_existing_frames(); -int record_thread_func(); +void record_thread_func(); int main(int argc, char **argv) { @@ -451,8 +451,13 @@ void load_existing_frames() db.clean_unused_frame_files(frame_basenames); } -int record_thread_func() +void record_thread_func() { + if (global_flags.stream_source.empty() || global_flags.stream_source == "/dev/null") { + // Save the user from some repetitive messages. + return; + } + pthread_setname_np(pthread_self(), "ReceiveFrames"); int64_t pts_offset; @@ -512,5 +517,4 @@ int record_thread_func() start_pts = last_pts + TIMEBASE; } - return 0; }