X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=video_encoder.cpp;h=6344b8c6a04a89e0fe6e9e312999a2ad449ab93f;hb=4ecd34848b59533e0db7e70ad893b2d75ad6e464;hp=d2f5dbe43d5a625583a3f9b60bf19f768a679a54;hpb=5743f5528c75acdfd381a494db0b4936a3ab218b;p=nageru diff --git a/video_encoder.cpp b/video_encoder.cpp index d2f5dbe..6344b8c 100644 --- a/video_encoder.cpp +++ b/video_encoder.cpp @@ -34,7 +34,7 @@ string generate_local_dump_filename(int frame) tm now_tm; localtime_r(&now, &now_tm); - char timestamp[256]; + char timestamp[64]; strftime(timestamp, sizeof(timestamp), "%F-%T%z", &now_tm); // Use the frame number to disambiguate between two cuts starting @@ -193,8 +193,7 @@ void VideoEncoder::open_output_stream() video_extradata = x264_encoder->get_global_headers(); } - int time_base = global_flags.stream_coarse_timebase ? COARSE_TIMEBASE : TIMEBASE; - stream_mux.reset(new Mux(avctx, width, height, video_codec, video_extradata, stream_audio_encoder->get_codec_parameters().get(), time_base, + stream_mux.reset(new Mux(avctx, width, height, video_codec, video_extradata, stream_audio_encoder->get_codec_parameters().get(), COARSE_TIMEBASE, /*write_callback=*/nullptr, Mux::WRITE_FOREGROUND, { &stream_mux_metrics })); stream_mux_metrics.init({{ "destination", "http" }}); }