summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2018-04-25 21:35:33 +0200
committerMax Kellermann <max@musicpd.org>2018-04-25 21:35:33 +0200
commit1e54297be8322546b0b9c651989ce7fdc5ea2ce2 (patch)
tree25ef8390afad9ac709492281a7a214fcc4be8733
parent44b200240f1f4b8394dd2e58fec72da3d3ec448f (diff)
lib/ffmpeg/Init: fix av_register_all() deprecation warning
av_register_all() was deprecated in FFmpeg/FFmpeg@0694d8702421e7aff1340038559c438b61bb30dd
-rw-r--r--NEWS2
-rw-r--r--src/lib/ffmpeg/Init.cxx3
2 files changed, 5 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index c27ab3d35..11a77af8d 100644
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,8 @@ ver 0.20.19 (not yet released)
- validate absolute seek time, reject negative values
* input
- mms: fix lockup bug and a crash bug
+* decoder
+ - ffmpeg: fix av_register_all() deprecation warning (FFmpeg 4.0)
* player
- fix spurious "Not seekable" error when switching radio streams
* macOS: fix crash bug
diff --git a/src/lib/ffmpeg/Init.cxx b/src/lib/ffmpeg/Init.cxx
index 7f11a72d4..9a7872618 100644
--- a/src/lib/ffmpeg/Init.cxx
+++ b/src/lib/ffmpeg/Init.cxx
@@ -33,6 +33,9 @@ FfmpegInit()
{
av_log_set_callback(FfmpegLogCallback);
+#if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(58, 9, 100)
+ /* deprecated as of FFmpeg 4.0 */
av_register_all();
+#endif
}