2013-04-26 29 views
0

我正在构建ffmpeg并卡在一个不寻常的地方。在libavutil里面我们有float_dsp.h和float_dsp.c文件。这些内部文件是有methond的宣言是:Ffmpeg-Build:构建期间出错

void (*butterflies_float)(float *av_restrict v1, float *av_restrict v2, int len); 
float (*scalarproduct_float)(const float *v1, const float *v2, int len); 

建立和编译这个文件我得到这个错误,而且不知道该怎么做的时候。我认为问题在别的地方,但再也不知道。错误是

jni/ffmpeg/libavcodec/../libavutil/float_dsp.h:150: error: expected ';', ',' or ')' before 'v1' 
jni/ffmpeg/libavcodec/../libavutil/float_dsp.h:161: error: expected ';' before 'float' 

如果谁愿意​​帮助,请向前走了一步,因为我还没有真正得到了几个星期的期间ffmpeg的任何支持了。

问候

回答

0

这可能由下列原因造成:

GCC还有其他支持的表格,如__restrict__restrict__。 ffmpeg配置脚本将宏av_restrict设置为restrict,这可以在生成的config.h文件中进行检查。

修复可能会改变配置的检测代码,并删除无效的情况下restrict

--- ./configure.orig 2014-01-15 18:53:59.000000000 +0100 
+++ ./configure 2014-03-13 17:50:45.754442028 +0100 
@@ -3896,7 +3896,7 @@ 
EOF 

_restrict= 
-for restrict_keyword in restrict __restrict__ __restrict; do 
+for restrict_keyword in __restrict__ __restrict; do 
    check_cc <<EOF && _restrict=$restrict_keyword && break 
void foo(char * $restrict_keyword p); 
EOF