--- a/modules/codec/avcodec/directx_va.c
+++ b/modules/codec/avcodec/directx_va.c
@@ -48,25 +48,25 @@
 #include "../../packetizer/h264_nal.h"
 #include "../../packetizer/hevc_nal.h"
 
-static const int PROF_MPEG2_MAIN[]   = { FF_PROFILE_MPEG2_SIMPLE,
-                                         FF_PROFILE_MPEG2_MAIN,
-                                         FF_PROFILE_UNKNOWN };
-static const int PROF_H264_HIGH[]    = { FF_PROFILE_H264_BASELINE,
-                                         FF_PROFILE_H264_CONSTRAINED_BASELINE,
-                                         FF_PROFILE_H264_MAIN,
-                                         FF_PROFILE_H264_HIGH,
-                                         FF_PROFILE_UNKNOWN };
-static const int PROF_HEVC_MAIN[]    = { FF_PROFILE_HEVC_MAIN,
-                                         FF_PROFILE_UNKNOWN };
-static const int PROF_HEVC_MAIN10[]  = { FF_PROFILE_HEVC_MAIN,
-                                         FF_PROFILE_HEVC_MAIN_10,
-                                         FF_PROFILE_UNKNOWN };
+static const int PROF_MPEG2_MAIN[]   = { AV_PROFILE_MPEG2_SIMPLE,
+                                         AV_PROFILE_MPEG2_MAIN,
+                                         AV_PROFILE_UNKNOWN };
+static const int PROF_H264_HIGH[]    = { AV_PROFILE_H264_BASELINE,
+                                         AV_PROFILE_H264_CONSTRAINED_BASELINE,
+                                         AV_PROFILE_H264_MAIN,
+                                         AV_PROFILE_H264_HIGH,
+                                         AV_PROFILE_UNKNOWN };
+static const int PROF_HEVC_MAIN[]    = { AV_PROFILE_HEVC_MAIN,
+                                         AV_PROFILE_UNKNOWN };
+static const int PROF_HEVC_MAIN10[]  = { AV_PROFILE_HEVC_MAIN,
+                                         AV_PROFILE_HEVC_MAIN_10,
+                                         AV_PROFILE_UNKNOWN };
 
-static const int PROF_VP9_MAIN[]    = { FF_PROFILE_VP9_0, FF_PROFILE_UNKNOWN };
-static const int PROF_VP9_10[]      = { FF_PROFILE_VP9_2, FF_PROFILE_UNKNOWN };
+static const int PROF_VP9_MAIN[]    = { AV_PROFILE_VP9_0, AV_PROFILE_UNKNOWN };
+static const int PROF_VP9_10[]      = { AV_PROFILE_VP9_2, AV_PROFILE_UNKNOWN };
 
-static const int PROF_AV1_MAIN[]    = { FF_PROFILE_AV1_MAIN, FF_PROFILE_UNKNOWN };
-static const int PROF_AV1_HIGH[]    = { FF_PROFILE_AV1_HIGH, FF_PROFILE_AV1_MAIN, FF_PROFILE_UNKNOWN };
+static const int PROF_AV1_MAIN[]    = { AV_PROFILE_AV1_MAIN, AV_PROFILE_UNKNOWN };
+static const int PROF_AV1_HIGH[]    = { AV_PROFILE_AV1_HIGH, AV_PROFILE_AV1_MAIN, AV_PROFILE_UNKNOWN };
 
 #include <winapifamily.h>
 #if defined(WINAPI_FAMILY)
@@ -436,7 +436,7 @@
     bool is_supported = false;
     if (profile <= 0)
         is_supported = true;
-    else for (const int *p_profile = &mode->p_profiles[0]; *p_profile != FF_PROFILE_UNKNOWN; ++p_profile)
+    else for (const int *p_profile = &mode->p_profiles[0]; *p_profile != AV_PROFILE_UNKNOWN; ++p_profile)
     {
         if (*p_profile == profile)
         {
--- a/modules/codec/avcodec/vaapi.c
+++ b/modules/codec/avcodec/vaapi.c
@@ -87,9 +87,9 @@
         count = 18;
         break;
     case AV_CODEC_ID_HEVC:
-        if (ctx->profile == FF_PROFILE_HEVC_MAIN)
+        if (ctx->profile == AV_PROFILE_HEVC_MAIN)
             i_profile = VAProfileHEVCMain;
-        else if (ctx->profile == FF_PROFILE_HEVC_MAIN_10)
+        else if (ctx->profile == AV_PROFILE_HEVC_MAIN_10)
         {
             i_profile = VAProfileHEVCMain10;
             i_vlc_chroma = VLC_CODEC_VAAPI_420_10BPP;
@@ -103,10 +103,10 @@
         count = 5;
         break;
     case AV_CODEC_ID_VP9:
-        if (ctx->profile == FF_PROFILE_VP9_0)
+        if (ctx->profile == AV_PROFILE_VP9_0)
             i_profile = VAProfileVP9Profile0;
 #if VA_CHECK_VERSION( 0, 39, 0 )
-        else if (ctx->profile == FF_PROFILE_VP9_2)
+        else if (ctx->profile == AV_PROFILE_VP9_2)
         {
             i_profile = VAProfileVP9Profile2;
             i_vlc_chroma = VLC_CODEC_VAAPI_420_10BPP;
