mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-08 22:45:43 +00:00
37 lines
1.4 KiB
Diff
37 lines
1.4 KiB
Diff
diff -rupN a/src/plugins/avcodec/avcodec.c b/src/plugins/avcodec/avcodec.c
|
|
--- a/src/plugins/avcodec/avcodec.c 2011-10-20 21:26:08.000000000 +0200
|
|
+++ b/src/plugins/avcodec/avcodec.c 2013-07-22 17:17:53.098385978 +0200
|
|
@@ -134,7 +134,6 @@ xmms_avcodec_init (xmms_xform_t *xform)
|
|
|
|
xmms_xform_private_data_set (xform, data);
|
|
|
|
- avcodec_init ();
|
|
avcodec_register_all ();
|
|
|
|
mimetype = xmms_xform_indata_get_str (xform,
|
|
@@ -200,7 +199,7 @@ xmms_avcodec_init (xmms_xform_t *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;
|
|
@@ -211,7 +210,7 @@ xmms_avcodec_init (xmms_xform_t *xform)
|
|
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);
|
|
goto err;
|
|
} else {
|
|
diff -rupN a/src/plugins/avcodec/avcodec_compat.h b/src/plugins/avcodec/avcodec_compat.h
|
|
--- a/src/plugins/avcodec/avcodec_compat.h 2011-10-20 21:26:08.000000000 +0200
|
|
+++ b/src/plugins/avcodec/avcodec_compat.h 2013-07-22 17:16:15.841723560 +0200
|
|
@@ -65,3 +65,4 @@ typedef struct AVPacket {
|
|
# define AVMEDIA_TYPE_AUDIO CODEC_TYPE_AUDIO
|
|
#endif
|
|
|
|
+#define AVCODEC_MAX_AUDIO_FRAME_SIZE 192000
|