[FFmpeg-devel] [PATCH] elbg.c Cygwin compatibility workaround
Michael Niedermayer
michaelni
Sat Jun 9 11:26:36 CEST 2007
Hi
On Sat, Jun 09, 2007 at 03:26:18AM -0400, Eric Lasota wrote:
> Compiling libavcodec/elbg.c with:
> gcc version 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)
> yields the following:
>
> In file included from elbg.c:29:
> avcodec.h:2500: warning: `ImgReSampleContext' is deprecated (declared at
> avcodec
> .h:2479)
> avcodec.h:2506: warning: `ImgReSampleContext' is deprecated (declared at
> avcodec
> .h:2479)
> /src/ffmpeg/libavutil/random.h: In function `av_random':
> elbg.c:117: error: prior parameter's size depends on 'dim'
> elbg.c:188: error: prior parameter's size depends on 'elbg'
> elbg.c:134: confused by earlier errors, bailing out
>
>
> This patch resolves those errors by changing the problematic function
> parameters to one-dimensional arrays, and adapting the code that uses
> those parameters accordingly.
>
> Index: libavcodec/elbg.c
> ===================================================================
> --- libavcodec/elbg.c (revision 9260)
> +++ libavcodec/elbg.c (working copy)
> @@ -115,7 +115,7 @@
> * Implementation of the simple LBG algorithm for just two codebooks
> */
> static int simple_lbg(int dim,
> - int centroid[3][dim],
> + int centroid[], // [3][dim]
> int newutility[3],
> int *points,
> cell *cells)
i think it should rather be int *centroid[3]
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
In a rich man's house there is no place to spit but his face.
-- Diogenes of Sinope
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070609/a1051a0e/attachment.pgp>
More information about the ffmpeg-devel
mailing list