--- src/plugins/avcodec/avcodec.c.orig 2011-10-20 12:26:08.000000000 -0700
+++ src/plugins/avcodec/avcodec.c 2013-08-06 12:35:32.000000000 -0700
#include "avcodec_compat.h"
#define AVCODEC_BUFFER_SIZE 16384
+#define MAX_AUDIO_FRAME_SIZE 192000 // 1 second of 48khz 32bit audio
AVCodecContext *codecctx;
xmms_xform_private_data_set (xform, data);
mimetype = xmms_xform_indata_get_str (xform,
- data->codecctx = avcodec_alloc_context ();
+ data->codecctx = avcodec_alloc_context3 (NULL);
data->codecctx->sample_rate = data->samplerate;
data->codecctx->channels = data->channels;
data->codecctx->bit_rate = data->bitrate;
data->codecctx->codec_id = codec->id;
data->codecctx->codec_type = codec->type;
- if (avcodec_open (data->codecctx, codec) < 0) {
+ if (avcodec_open2 (data->codecctx, codec, NULL) < 0) {
XMMS_DBG ("Opening decoder '%s' failed", codec->name);
xmms_avcodec_data_t *data;
- char outbuf[AVCODEC_MAX_AUDIO_FRAME_SIZE];
+ char outbuf[MAX_AUDIO_FRAME_SIZE];
gint outbufsize, bytes_read = 0;
xmms_avcodec_seek (xmms_xform_t *xform, gint64 samples, xmms_xform_seek_mode_t whence, xmms_error_t *err)
xmms_avcodec_data_t *data;
- char outbuf[AVCODEC_MAX_AUDIO_FRAME_SIZE];
+ char outbuf[MAX_AUDIO_FRAME_SIZE];
gint outbufsize, bytes_read = 0;