[FFmpeg-devel] [PATCH] indeo2.c:202:1: directives may not be used inside a macro argument (gcc 3.2)

Christian Lohmaier cloph
Sun Jun 3 13:48:01 CEST 2007


Hi *,

I'm not subcribed, so please CC me in replies.

This simple patch allows to build ffmpeg with gcc 3.2.3
It doesn't change functionality, only moves the #ifdef out of the
parameter-list.

Since I know that this compiler is pretty old, feel free to not apply
the patch, just as you wish.

For reference, the error the compiler spits out:

indeo2.c:202:1: directives may not be used inside a macro argument
indeo2.c:201:40: unterminated argument list invoking macro "init_vlc"
indeo2.c: In function `ir2_decode_init':
indeo2.c:203: `init_vlc' undeclared (first use in this function)
indeo2.c:203: (Each undeclared identifier is reported only once
indeo2.c:203: for each function it appears in.)
indeo2.c:203: warning: left-hand operand of comma expression has no effect
indeo2.c:203: warning: left-hand operand of comma expression has no effect
indeo2.c:203: warning: left-hand operand of comma expression has no effect
indeo2.c:203: syntax error before ')' token

ciao
Christian
-- 
NP: Bif Naked - Story Of My Life
-------------- next part --------------
--- libavcodec/indeo2.c	2007-06-03 13:18:27.000000000 +0200
+++ libavcodec/indeo2.c_patched	2007-06-03 13:19:15.000000000 +0200
@@ -197,11 +197,13 @@
     avctx->pix_fmt= PIX_FMT_YUV410P;
 
     if (!ir2_vlc.table)
+#ifdef ALT_BITSTREAM_READER_LE
         init_vlc(&ir2_vlc, CODE_VLC_BITS, IR2_CODES,
                  &ir2_codes[0][1], 4, 2,
-#ifdef ALT_BITSTREAM_READER_LE
                  &ir2_codes[0][0], 4, 2, INIT_VLC_USE_STATIC | INIT_VLC_LE);
 #else
+        init_vlc(&ir2_vlc, CODE_VLC_BITS, IR2_CODES,
+                 &ir2_codes[0][1], 4, 2,
                  &ir2_codes[0][0], 4, 2, INIT_VLC_USE_STATIC);
 #endif
 



More information about the ffmpeg-devel mailing list