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
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" }});
}
stream_mux_header.append((char *)buf, buf_size);
httpd->set_header(stream_mux_header);
} else {
- httpd->add_data((char *)buf, buf_size, type == AVIO_DATA_MARKER_SYNC_POINT);
+ httpd->add_data((char *)buf, buf_size, type == AVIO_DATA_MARKER_SYNC_POINT, time, AVRational{ AV_TIME_BASE, 1 });
}
return buf_size;
}