From 50e2e30242a9d75c040bdb67039ce73f4d7d6317 Mon Sep 17 00:00:00 2001 From: Lars Wendler Date: Thu, 16 Jan 2025 11:45:26 +0100 Subject: [PATCH] ffmpeg7 fixes --- src/arch/MovieTexture/MovieTexture_FFMpeg.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/arch/MovieTexture/MovieTexture_FFMpeg.cpp b/src/arch/MovieTexture/MovieTexture_FFMpeg.cpp index 935ddf324b..2e3389a190 100644 --- a/src/arch/MovieTexture/MovieTexture_FFMpeg.cpp +++ b/src/arch/MovieTexture/MovieTexture_FFMpeg.cpp @@ -9,6 +9,12 @@ #include +#if LIBAVCODEC_VERSION_MAJOR >= 60 +#define FRAME_NUM frame_num +#else +#define FRAME_NUM frame_number +#endif + static void FixLilEndian() { #if defined(ENDIAN_LITTLE) @@ -273,7 +279,7 @@ int MovieDecoder_FFMpeg::DecodePacket( float fTargetTime ) bool bSkipThisFrame = fTargetTime != -1 && GetTimestamp() + GetFrameDuration() < fTargetTime && - (m_pStreamCodec->frame_number % 2) == 0; + (m_pStreamCodec->FRAME_NUM % 2) == 0; int iGotFrame; int len; -- 2.48.1