]> git.sesse.net Git - nageru/commitdiff
Fix FFmpeg frame rate calculation with VA-API acceleration.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Mon, 1 Jun 2020 21:45:54 +0000 (23:45 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Mon, 1 Jun 2020 21:45:54 +0000 (23:45 +0200)
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);
                                }
                                        *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;
                                video_avframe = move(sw_frame);
                        }
                        frame_finished = true;