]> git.sesse.net Git - nageru/blobdiff - nageru/ffmpeg_capture.cpp
Use AVFrame::duration instead of AVFrame::pkt_duration.
[nageru] / nageru / ffmpeg_capture.cpp
index 09c1d26e15b3642be4ea64eff4fa3e8da606c01c..4b9d477648cdbc8ee7e3efedfb79e112e972a2b3 100644 (file)
@@ -50,6 +50,11 @@ using namespace bmusb;
 using namespace movit;
 using namespace Eigen;
 
+// Avoid deprecation warnings, but we don't want to drop FFmpeg 5.1 support just yet.
+#if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(57, 30, 100)
+#define pkt_duration duration
+#endif
+
 namespace {
 
 steady_clock::time_point compute_frame_start(int64_t frame_pts, int64_t pts_origin, const AVRational &video_timebase, const steady_clock::time_point &origin, double rate)