diff options
author | Uwe Klotz <uklotz@mixxx.org> | 2021-04-24 21:08:16 +0200 |
---|---|---|
committer | Uwe Klotz <uklotz@mixxx.org> | 2021-04-24 21:08:38 +0200 |
commit | 86a22e60e4a6decf28cb598909b6a520c31b4c0a (patch) | |
tree | 8267e092cd8c6e95057c533e22e06c8d7595e837 /src/sources | |
parent | 46bbd67b3b233e6b775f4dbfe5ff1635e0cad52e (diff) |
Fix deprecation warnings for FFmpeg 4.4
https://pkgs.rpmfusion.org/cgit/free/mixxx.git/commit/?h=f34&id=0906bbdf0e5bd7ec4b1fccd583face042f24a056
Diffstat (limited to 'src/sources')
-rw-r--r-- | src/sources/soundsourceffmpeg.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/sources/soundsourceffmpeg.cpp b/src/sources/soundsourceffmpeg.cpp index 5b5b66ed38..c25231ca97 100644 --- a/src/sources/soundsourceffmpeg.cpp +++ b/src/sources/soundsourceffmpeg.cpp @@ -1020,9 +1020,15 @@ ReadableSampleFrames SoundSourceFFmpeg::readSampleFramesClamped( CSAMPLE* pOutputSampleBuffer = writableSampleFrames.writableData(); AVPacket avPacket; +#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(58, 133, 100) + get_packet_defaults(&avPacket); +#else + // Deprecated in FFmpeg 4.4 + // See also: https://github.com/FFmpeg/FFmpeg/blob/master/doc/APIchanges av_init_packet(&avPacket); avPacket.data = nullptr; avPacket.size = 0; +#endif AVPacket* pavNextPacket = nullptr; while (m_frameBuffer.isValid() && // no decoding error occurred (pavNextPacket || !writableFrameRange.empty()) && // not yet finished |