From: Steinar H. Gunderson Date: Mon, 1 Jun 2020 21:45:54 +0000 (+0200) Subject: Fix FFmpeg frame rate calculation with VA-API acceleration. X-Git-Tag: 2.0.0~2 X-Git-Url: https://git.sesse.net/?p=nageru;a=commitdiff_plain;h=e180625a53cb78a3d326a007e9aedfdc1b844bfa Fix FFmpeg frame rate calculation with VA-API acceleration. --- 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;