缺省是做-O3的优化,看config.mak文件。
CFLAGS= -std=c11 -fomit-frame-pointer -pthread -g -Wdeclaration-after-statement -Wall -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wwrite-strings -Wtype-limits -Wundef -Wmissing-prototypes -Wno-pointer-to-int-cast -Wstrict-prototypes -Wempty-body
-Wno-parentheses -Wno-switch -Wno-format-zero-length -Wno-pointer-sign
-O3 -fno-math-errno -fno-signed-zeros -fno-tree-vectorize -Werror=format-security -Werror=implicit-function-declaration -Werror=missing-prototypes -Werror=return-type -Werror=vla -Wformat -fdiagnostics-color=auto
-Wno-maybe-uninitialized
1) delete the -O3
2) change -O3 to O0:
HOSTCFLAGS= -std=c99 -Wall -O3
FFMPEG show the following messages:
ffmpeg version N-82982-gb7a6d28 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.1) 20160609
configuration: --enable-debug=3 --disable-optimizations --disable-asm --disable-stripping
libavutil 55. 43.100 / 55. 43.100
libavcodec 57. 70.101 / 57. 70.101
libavformat 57. 61.100 / 57. 61.100
libavdevice 57. 2.100 / 57. 2.100
libavfilter 6. 68.100 / 6. 68.100
libswscale 4. 3.101 / 4. 3.101
libswresample 2. 4.100 / 2. 4.100
//参考了这个博客:
http://blog.youkuaiyun.com/glcdw/article/details/7258359