summaryrefslogtreecommitdiff
path: root/community/xmms2/ffmpeg2.0.patch
blob: 87cc974c3aab47f1705c70f8d4d8f493e754ed09 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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