[vlc-commits] [Git][videolan/vlc][master] avcodec: do not use field removed in API 60

Hugo Beauzée-Luyssen (@chouquette) gitlab at videolan.org
Thu Jan 20 11:13:27 UTC 2022



Hugo Beauzée-Luyssen pushed to branch master at VideoLAN / VLC


Commits:
02e8981b by Romain Vimont at 2022-01-20T10:46:15+00:00
avcodec: do not use field removed in API 60

AVCodecContext.thread_safe_callbacks will be removed in API 60:

> Thread-unsafe get_buffer2() implementations will be invalid starting
> with LIBAVCODEC_VERSION_MAJOR=60; in other words, libavcodec will
> behave as if this field was always set to 1.

In current FFmpeg 5.0 (API 59), we must still set the variable, and it
is already deprecated, so we can't get rid of the deprecation warning..

ffmpeg/a83098ab03a47179d54a9b9c8bcefc81b9c6aafd (deprecation)
ffmpeg/54e5d21acabb452e5680de5db3bf7567d351d68e (doc)

- - - - -


1 changed file:

- modules/codec/avcodec/video.c


Changes:

=====================================
modules/codec/avcodec/video.c
=====================================
@@ -529,7 +529,9 @@ int InitVideoDec( vlc_object_t *obj )
     i_thread_count = __MIN( i_thread_count, p_codec->id == AV_CODEC_ID_HEVC ? 32 : 16 );
     msg_Dbg( p_dec, "allowing %d thread(s) for decoding", i_thread_count );
     p_context->thread_count = i_thread_count;
+#if LIBAVCODEC_VERSION_MAJOR < 60
     p_context->thread_safe_callbacks = true;
+#endif
 
     switch( p_codec->id )
     {



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/02e8981b57c647641b188f8612a6e4b1e31a660a

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/02e8981b57c647641b188f8612a6e4b1e31a660a
You're receiving this email because of your account on code.videolan.org.




More information about the vlc-commits mailing list