cd6ef2b
changeset:   623785:a6b80ee8c35f
cd6ef2b
tag:         tip
cd6ef2b
parent:      623782:b1ed2fa50612
cd6ef2b
user:        stransky <stransky@redhat.com>
cd6ef2b
date:        Wed Jun 15 14:54:19 2022 +0200
cd6ef2b
files:       dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp
cd6ef2b
description:
cd6ef2b
Bug 1758948 [FFmpeg] Use AVFrame::pts instead of AVFrame::pkt_pts on ffmpeg 4.x r?alwu
cd6ef2b
cd6ef2b
AVFrame::pkt_pts has been deprecated and gives us wrong values for AV1 VA-API. Let's use AVFrame::pts instead on ffmpeg 4.x
cd6ef2b
as well as we use on ffmpeg 5.0 where AVFrame::pkt_pts is removed.
cd6ef2b
cd6ef2b
Differential Revision: https://phabricator.services.mozilla.com/D149386
cd6ef2b
cd6ef2b
cd6ef2b
diff --git a/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp b/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp
cd6ef2b
--- a/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp
cd6ef2b
+++ b/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp
cd6ef2b
@@ -774,7 +774,7 @@ void FFmpegVideoDecoder<LIBAV_VER>::Init
cd6ef2b
 #endif
cd6ef2b
 
cd6ef2b
 static int64_t GetFramePts(AVFrame* aFrame) {
cd6ef2b
-#if LIBAVCODEC_VERSION_MAJOR > 58
cd6ef2b
+#if LIBAVCODEC_VERSION_MAJOR > 57
cd6ef2b
   return aFrame->pts;
cd6ef2b
 #else
cd6ef2b
   return aFrame->pkt_pts;
cd6ef2b