@@ -18,7 +18,7 @@ ERL_NIF_TERM new (ErlNifEnv *env, int argc, const ERL_NIF_TERM argv[]) {
1818 ERL_NIF_TERM ret ;
1919 struct EncoderConfig encoder_config = {0 };
2020 encoder_config .max_b_frames = -1 ;
21- encoder_config .profile = FF_PROFILE_UNKNOWN ;
21+ encoder_config .profile = AV_PROFILE_UNKNOWN ;
2222
2323 char * codec_name = NULL , * format = NULL , * profile = NULL ;
2424 char * channel_layout = NULL ;
@@ -112,7 +112,7 @@ ERL_NIF_TERM new (ErlNifEnv *env, int argc, const ERL_NIF_TERM argv[]) {
112112
113113 if (profile ) {
114114 encoder_config .profile = get_profile (encoder_config .codec -> id , profile );
115- if (encoder_config .profile == FF_PROFILE_UNKNOWN ) {
115+ if (encoder_config .profile == AV_PROFILE_UNKNOWN ) {
116116 ret = xav_nif_raise (env , "invalid_profile" );
117117 goto clean ;
118118 }
@@ -302,10 +302,10 @@ static int get_profile(enum AVCodecID codec, const char *profile_name) {
302302 const AVProfile * profile = desc -> profiles ;
303303
304304 if (profile == NULL ) {
305- return FF_PROFILE_UNKNOWN ;
305+ return AV_PROFILE_UNKNOWN ;
306306 }
307307
308- while (profile -> profile != FF_PROFILE_UNKNOWN ) {
308+ while (profile -> profile != AV_PROFILE_UNKNOWN ) {
309309 if (strcmp (profile -> name , profile_name ) == 0 ) {
310310 break ;
311311 }
@@ -326,7 +326,7 @@ static ERL_NIF_TERM codec_get_profiles(ErlNifEnv *env, const AVCodec *codec) {
326326 return result ;
327327 }
328328
329- while (profile -> profile != FF_PROFILE_UNKNOWN ) {
329+ while (profile -> profile != AV_PROFILE_UNKNOWN ) {
330330 ERL_NIF_TERM profile_name = enif_make_string (env , profile -> name , ERL_NIF_LATIN1 );
331331 result = enif_make_list_cell (env , profile_name , result );
332332
@@ -382,4 +382,4 @@ static int load(ErlNifEnv *env, void **priv, ERL_NIF_TERM load_info) {
382382 return 0 ;
383383}
384384
385- ERL_NIF_INIT (Elixir .Xav .Encoder .NIF , xav_funcs , & load , NULL , NULL , NULL );
385+ ERL_NIF_INIT (Elixir .Xav .Encoder .NIF , xav_funcs , & load , NULL , NULL , NULL );
0 commit comments