]> git.sesse.net Git - nageru/blobdiff - nageru/ffmpeg_capture.cpp
Fix FFmpeg frame rate calculation with VA-API acceleration.
[nageru] / nageru / ffmpeg_capture.cpp
index a667d4f5b033aca8f5393d90f0f73bee31a87e4d..8f174ad018f7e236c896b7458af7e3248101a62f 100644 (file)
@@ -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;