FFmpegコンパイル
FFmpegのコンパイルとついでにデバッグについて
$ wget http://ffmpeg.org/releases/ffmpeg-0.5.tar.bz2 $ bzip2 -dc ffmpeg-0.5.tar.bz2 | tar xvf - $ cd ffmpeg-0.5/ $ ./configure $ make
$ ./ffmpeg -i "test.mpg" -vcodec bmp "%05d.bmp"
$ ./configure $ make ... gcc -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I. -I"/home/futada/ffmpeg-0.5" -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -std=c99 -fomit-frame-pointer -g -Wdeclaration-after-statement -Wall -Wno-switch -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wno-pointer-sign -Wcast-qual -Wwrite-strings -Wtype-limits -Wundef -O3 -fno-math-errno -fno-signed-zeros -c -o libavcodec/mpeg12.o libavcodec/mpeg12.c ... gcc -L"/home/futada/ffmpeg-0.5"/libavdevice -L"/home/futada/ffmpeg-0.5"/libavformat -L"/home/futada/ffmpeg-0.5"/libavcodec -L"/home/futada/ffmpeg-0.5"/libavutil -rdynamic -export-dynamic -Wl,--warn-common -Wl,--as-needed -Wl,-rpath-link,"/home/futada/ffmpeg-0.5"/libpostproc -Wl,-rpath-link,"/home/futada/ffmpeg-0.5"/libswscale -Wl,-rpath-link,"/home/futada/ffmpeg-0.5"/libavfilter -Wl,-rpath-link,"/home/futada/ffmpeg-0.5"/libavdevice -Wl,-rpath-link,"/home/futada/ffmpeg-0.5"/libavformat -Wl,-rpath-link,"/home/futada/ffmpeg-0.5"/libavcodec -Wl,-rpath-link,"/home/futada/ffmpeg-0.5"/libavutil -Wl,-Bsymbolic -o ffmpeg_g ffmpeg.o cmdutils.o -lavdevice -lavformat -lavcodec -lavutil -lm -ldl -ldl cp -p ffmpeg_g ffmpeg strip ffmpeg ...
$ ./configure --disable-optimizations $ make ... gcc -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I. -I"/home/futada/ffmpeg-0.5" -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -std=c99 -g -Wdeclaration-after-statement -Wall -Wno-switch -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wno-pointer-sign -Wcast-qual -Wwrite-strings -Wtype-limits -Wundef -fno-math-errno -fno-signed-zeros -c -o libavcodec/mpeg12.o libavcodec/mpeg12.c ... gcc -L"/home/futada/ffmpeg-0.5"/libavdevice -L"/home/futada/ffmpeg-0.5"/libavformat -L"/home/futada/ffmpeg-0.5"/libavcodec -L"/home/futada/ffmpeg-0.5"/libavutil -rdynamic -export-dynamic -Wl,--warn-common -Wl,--as-needed -Wl,-rpath-link,"/home/futada/ffmpeg-0.5"/libpostproc -Wl,-rpath-link,"/home/futada/ffmpeg-0.5"/libswscale -Wl,-rpath-link,"/home/futada/ffmpeg-0.5"/libavfilter -Wl,-rpath-link,"/home/futada/ffmpeg-0.5"/libavdevice -Wl,-rpath-link,"/home/futada/ffmpeg-0.5"/libavformat -Wl,-rpath-link,"/home/futada/ffmpeg-0.5"/libavcodec -Wl,-rpath-link,"/home/futada/ffmpeg-0.5"/libavutil -Wl,-Bsymbolic -o ffmpeg_g ffmpeg.o cmdutils.o -lavdevice -lavformat -lavcodec -lavutil -lm -ldl -ldl cp -p ffmpeg_g ffmpeg strip ffmpeg ...
$ ./configure --disable-optimizations --disable-stripping $ make ... gcc -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I. -I"/home/futada/ffmpeg-0.5" -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -std=c99 -g -Wdeclaration-after-statement -Wall -Wno-switch -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wno-pointer-sign -Wcast-qual -Wwrite-strings -Wtype-limits -Wundef -fno-math-errno -fno-signed-zeros -c -o libavcodec/mpeg12.o libavcodec/mpeg12.c ... gcc -L"/home/futada/ffmpeg-0.5"/libavdevice -L"/home/futada/ffmpeg-0.5"/libavformat -L"/home/futada/ffmpeg-0.5"/libavcodec -L"/home/futada/ffmpeg-0.5"/libavutil -rdynamic -export-dynamic -Wl,--warn-common -Wl,--as-needed -Wl,-rpath-link,"/home/futada/ffmpeg-0.5"/libpostproc -Wl,-rpath-link,"/home/futada/ffmpeg-0.5"/libswscale -Wl,-rpath-link,"/home/futada/ffmpeg-0.5"/libavfilter -Wl,-rpath-link,"/home/futada/ffmpeg-0.5"/libavdevice -Wl,-rpath-link,"/home/futada/ffmpeg-0.5"/libavformat -Wl,-rpath-link,"/home/futada/ffmpeg-0.5"/libavcodec -Wl,-rpath-link,"/home/futada/ffmpeg-0.5"/libavutil -Wl,-Bsymbolic -o ffmpeg_g ffmpeg.o cmdutils.o -lavdevice -lavformat -lavcodec -lavutil -lm -ldl -ldl cp -p ffmpeg_g ffmpeg echo ignoring strip ffmpeg ...
Run gdb (like this): gdb --annotate=3 ffmpeg
b main
r -i "test.mpg" -vcodec bmp "%05d.bmp"