FrameAllocator::Frame audio_frame, size_t audio_offset, AudioFormat audio_format)
{
if (video_pts >= 0 && video_frame.len > 0) {
FrameAllocator::Frame audio_frame, size_t audio_offset, AudioFormat audio_format)
{
if (video_pts >= 0 && video_frame.len > 0) {
video_pts = av_rescale_q(video_pts, video_timebase, AVRational{ 1, TIMEBASE });
int64_t frame_duration = TIMEBASE * video_format.frame_rate_nom / video_format.frame_rate_den;
video_pts = av_rescale_q(video_pts, video_timebase, AVRational{ 1, TIMEBASE });
int64_t frame_duration = TIMEBASE * video_format.frame_rate_nom / video_format.frame_rate_den;
- x264_encoder->add_frame(video_pts, frame_duration, video->get_current_frame_ycbcr_format().luma_coefficients, video_frame.data + video_offset, ReceivedTimestamps());
+ x264_encoder->add_frame(video_pts, frame_duration, video->get_current_frame_ycbcr_format().luma_coefficients, video_frame.data + video_offset, ts);