Gentoo Archives: gentoo-commits

From: "Peter Volkov (pva)" <pva@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-libs/opal/files: opal-3.6.7-celt-0.7-update.patch
Date: Sun, 28 Feb 2010 10:43:13
Message-Id: E1NlgcB-0004m5-0j@stork.gentoo.org
1 pva 10/02/28 10:43:11
2
3 Added: opal-3.6.7-celt-0.7-update.patch
4 Log:
5 Fixed build issue with newer celt codec, #300629 thank Matti Nykyri for report and Stefan Knoblich for this fix. Updated ptlib dep, bug #306141, thank Andrey Grozin for report.
6 (Portage version: 2.1.7.17/cvs/Linux x86_64)
7
8 Revision Changes Path
9 1.1 net-libs/opal/files/opal-3.6.7-celt-0.7-update.patch
10
11 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-libs/opal/files/opal-3.6.7-celt-0.7-update.patch?rev=1.1&view=markup
12 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-libs/opal/files/opal-3.6.7-celt-0.7-update.patch?rev=1.1&content-type=text/plain
13
14 Index: opal-3.6.7-celt-0.7-update.patch
15 ===================================================================
16 --- a/plugins/audio/celt/celtcodec.c
17 +++ b/plugins/audio/celt/celtcodec.c
18 @@ -52,7 +52,12 @@ static int init_mode(CELTContext *celt, const struct PluginCodec_Definition * co
19 {
20 int error = 0;
21
22 - celt->mode = celt_mode_create(codec->sampleRate, 1, codec->parm.audio.samplesPerFrame, &error);
23 + celt->mode = celt_mode_create(codec->sampleRate,
24 +#if !defined(HAVE_CELT_0_7_0_OR_LATER)
25 + 1,
26 +#endif
27 + codec->parm.audio.samplesPerFrame,
28 + &error);
29 if (celt->mode == NULL) {
30 return FALSE;
31 }
32 @@ -65,6 +70,9 @@ static int init_mode(CELTContext *celt, const struct PluginCodec_Definition * co
33
34 static void * celt_create_encoder(const struct PluginCodec_Definition * codec)
35 {
36 +#if defined(HAVE_CELT_0_7_0_OR_LATER)
37 + int error = 0;
38 +#endif
39 CELTContext * celt = malloc(sizeof(CELTContext));
40 if (celt == NULL)
41 return NULL;
42 @@ -73,8 +81,12 @@ static void * celt_create_encoder(const struct PluginCodec_Definition * codec)
43 free(celt);
44 return NULL;
45 }
46 -
47 +
48 +#if defined(HAVE_CELT_0_7_0_OR_LATER)
49 + celt->encoder_state = celt_encoder_create(celt->mode, 1, &error);
50 +#else
51 celt->encoder_state = celt_encoder_create(celt->mode);
52 +#endif
53 if (celt->encoder_state == NULL ) {
54 celt_mode_destroy(celt->mode);
55 free(celt);
56 @@ -87,6 +99,9 @@ static void * celt_create_encoder(const struct PluginCodec_Definition * codec)
57
58 static void * celt_create_decoder(const struct PluginCodec_Definition * codec)
59 {
60 +#if defined(HAVE_CELT_0_7_0_OR_LATER)
61 + int error = 0;
62 +#endif
63 CELTContext * celt = malloc(sizeof(CELTContext));
64 if (celt == NULL)
65 return NULL;
66 @@ -96,7 +111,11 @@ static void * celt_create_decoder(const struct PluginCodec_Definition * codec)
67 return NULL;
68 }
69
70 +#if defined(HAVE_CELT_0_7_0_OR_LATER)
71 + celt->decoder_state = celt_decoder_create(celt->mode, 1, &error);
72 +#else
73 celt->decoder_state = celt_decoder_create(celt->mode);
74 +#endif
75 if (celt->decoder_state == NULL ) {
76 celt_mode_destroy(celt->mode);
77 free(celt);
78 @@ -142,7 +161,9 @@ static int celt_codec_encoder(const struct PluginCodec_Definition * codec,
79 if (*toLen < celt->bytes_per_packet)
80 return FALSE;
81
82 -#ifdef HAVE_CELT_0_5_0_OR_LATER
83 +#if defined(HAVE_CELT_0_7_0_OR_LATER)
84 + byteCount = celt_encode(celt->encoder_state, (celt_int16 *)fromPtr, NULL, (char *)toPtr, celt->bytes_per_packet);
85 +#elif defined(HAVE_CELT_0_5_0_OR_LATER)
86 byteCount = celt_encode(celt->encoder_state, (celt_int16_t *)fromPtr, NULL, (char *)toPtr, celt->bytes_per_packet);
87 #else
88 byteCount = celt_encode(celt->encoder_state, (celt_int16_t *)fromPtr, (char *)toPtr, celt->bytes_per_packet);
89 --- a/plugins/configure.ac
90 +++ b/plugins/configure.ac
91 @@ -313,9 +313,12 @@
92 AC_SUBST(CELT_LIBS)
93 AC_DEFINE([HAVE_CELT], [1], [celt])
94 HAVE_CELT=yes
95 - PKG_CHECK_EXISTS([celt >= 0.5.0],
96 - [
97 - AC_DEFINE([HAVE_CELT_0_5_0_OR_LATER], [1], [celt 0.5.0 or later found])
98 + PKG_CHECK_EXISTS([celt >= 0.7.0], [
99 + AC_DEFINE([HAVE_CELT_0_7_0_OR_LATER], [1], [celt 0.7.0 or later found])
100 + ],
101 + [PKG_CHECK_EXISTS([celt >= 0.5.0], [
102 + AC_DEFINE([HAVE_CELT_0_5_0_OR_LATER], [1], [celt 0.5.0 or later found])
103 + ])
104 ])
105 ],
106 [
107 --- a/plugins/plugin-config.h.in 2010-02-14 16:07:28.000000000 +0100
108 +++ b/plugins/plugin-config.h.in 2010-02-14 16:07:42.000000000 +0100
109 @@ -15,6 +15,9 @@
110 /* celt 0.5.0 or later found */
111 #undef HAVE_CELT_0_5_0_OR_LATER
112
113 +/* celt 0.7.0 or later found */
114 +#undef HAVE_CELT_0_7_0_OR_LATER
115 +
116 /* Define to 1 if you have the <dlfcn.h> header file. */
117 #undef HAVE_DLFCN_H