From e180625a53cb78a3d326a007e9aedfdc1b844bfa Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Mon, 1 Jun 2020 23:45:54 +0200 Subject: [PATCH] Fix FFmpeg frame rate calculation with VA-API acceleration. --- nageru/ffmpeg_capture.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nageru/ffmpeg_capture.cpp b/nageru/ffmpeg_capture.cpp index a667d4f..8f174ad 100644 --- a/nageru/ffmpeg_capture.cpp +++ b/nageru/ffmpeg_capture.cpp @@ -895,6 +895,8 @@ AVFrameWithDeleter FFmpegCapture::decode_frame(AVFormatContext *format_ctx, AVCo *error = true; return AVFrameWithDeleter(nullptr); } + sw_frame->pts = video_avframe->pts; + sw_frame->pkt_duration = video_avframe->pkt_duration; video_avframe = move(sw_frame); } frame_finished = true; -- 2.39.5