File fix-build-with-ffmpeg4.patch of Package kradio4
commit 06aab2b91666246cc884eb7734e465bba6d1752a
Author: Pino Toscano <toscano.pino@tiscali.it>
Date: Sun May 27 12:54:48 2018 +0200
internet radio: FF_INPUT_BUFFER_PADDING_SIZE -> AV_INPUT_BUFFER_PADDING_SIZE
libavcodec 4.0+ does not provide FF_INPUT_BUFFER_PADDING_SIZE anymore,
so use AV_INPUT_BUFFER_PADDING_SIZE when available, falling back to the
old define for older ffmpeg versions
Index: kradio4-4.0.8/plugins/internetradio/decoder_thread.cpp
===================================================================
--- kradio4-4.0.8.orig/plugins/internetradio/decoder_thread.cpp
+++ kradio4-4.0.8/plugins/internetradio/decoder_thread.cpp
@@ -40,6 +40,10 @@ extern "C" {
#include <libavutil/opt.h>
}
+#ifndef AV_INPUT_BUFFER_PADDING_SIZE /* LIBAVCODEC_VERSION_INT < AV_VERSION_INT(56, 60, 100) */
+# define AV_INPUT_BUFFER_PADDING_SIZE FF_INPUT_BUFFER_PADDING_SIZE
+#endif
+
InternetRadioDecoder::InternetRadioDecoder(QObject *event_parent,
const InternetRadioStation &rs,
@@ -566,7 +570,7 @@ static int InternetRadioDecoder_readInpu
void InternetRadioDecoder::initIOCallbacks(void *opaque, int(*read_packet_func)(void *, uint8_t *, int ))
{
// paranoia padding: 4x requirement
- unsigned char *ioBuffer = reinterpret_cast<unsigned char*>(av_malloc(DEFAULT_MMS_BUFFER_SIZE + 4 * FF_INPUT_BUFFER_PADDING_SIZE));
+ unsigned char *ioBuffer = reinterpret_cast<unsigned char*>(av_malloc(DEFAULT_MMS_BUFFER_SIZE + 4 * AV_INPUT_BUFFER_PADDING_SIZE));
#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(52, 110, 0) // checked: avformat_open_input in ffmpeg >= 0.7