我用xcode在macosx上调试ffmpeg程序,用xcode(或lldb)发现了一个bug。
code @ ffmpeg_opt.c-->static int open_input_file(OptionsContext *o, const char *filename)
#ifdef 调试
av_log(NULL,AV_LOG_INFO,"func:%s(%d) 文件名:%s\n", __func__,__LINE__,filename);
#万一
if (!strcmp(filename, "-"))//step over后,调试窗口显示filename=NULL。
文件名=“管道:”;
#ifdef 调试
av_log(NULL,AV_LOG_INFO,"func:%s(%d) 文件名:%s\n", __func__,__LINE__,filename);
//但它可以打印正确的值。
#万一
您可以从 https://github.com/daozhao/FFmpeg.git 克隆项目,以及包含 xcode 项目文件的结帐分支(release/2.2withComment)。您可以使用
FFmpegMakefile targets
进行调试试试看。您可以在https://www.youtube.com/watch?v=3rTLirTGPM4上看到屏幕记录.
我的操作系统:10.9.2,xcode:5.1.1
最佳答案
该项目使用外部构建系统进行构建。Makefile
由 ffmpeg configure 自动生成。
它添加了编译器优化选项-O3
.
因此,大写的外观。
远程编译器选项-O3
时没问题.
关于xcode - ffmpeg : Is this a bug in Xcode?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23053931/