[vlc-devel] [PATCH] Do not call deprecated av*_register_all()

Romain Vimont rom1v at videolabs.io
Tue Aug 21 16:47:17 CEST 2018


av_register_all() and avcodec_register_all() are deprecated in FFmpeg
since this commit:
<http://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=0694d8702421e7aff1340038559c438b61bb30dd>

It is now useless to call them:
<https://ffmpeg.org/pipermail/ffmpeg-devel/2018-February/225051.html>

(This removes a warning.)
---
 modules/codec/avcodec/avcommon.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/modules/codec/avcodec/avcommon.h b/modules/codec/avcodec/avcommon.h
index 65ad35f4ad..60c3e4baaf 100644
--- a/modules/codec/avcodec/avcommon.h
+++ b/modules/codec/avcodec/avcommon.h
@@ -102,7 +102,9 @@ static inline void vlc_init_avformat(vlc_object_t *obj)
 
     avformat_network_init();
 
+#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(58, 9, 100)
     av_register_all();
+#endif
 
     vlc_avcodec_unlock();
 }
@@ -116,7 +118,9 @@ static inline void vlc_init_avcodec(vlc_object_t *obj)
 
     vlc_init_avutil(obj);
 
+#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(58, 9, 100)
     avcodec_register_all();
+#endif
 
     vlc_avcodec_unlock();
 }
-- 
2.18.0



More information about the vlc-devel mailing list