I. Source Code Modification
1. Download http://d.download.csdn.net/down/2104626/yalexiaoqiang from FFMPEG-0.5
2. Search for the following keyword in the source code: Abort ()
File libavcodec/bitstream. c
Function
Static int alloc_table (VLC * VLC, int size, int use_static)
If (use_static> 1)
{
Int * pint = NULL;
* Pint = 5;
Return-1;
Abort ();
// Cant do anything, init_vlc () is used with too little memory
}
File libavcodec/bitstream. c
Function
Int init_vlc_sparse
Else if (VLC-> table_size ){
Int * pint = NULL;
* Pint = 5;
Return 0;
Abort (); // fatal error, we are called on a partially initialized table
}
File libavcodec/mpegvideo. c
Function
Int ff_find_unused_picture
Int * pint = NULL;
* Pint = 5;
Return-1;
Abort ();
File libavcodec/shorten. c
Function
Static
Void init_offset (shortencontext * s)
Int * pint = NULL;
* Pint = 5;
Return-1;
Abort ();
3. The system prompts "runtime error" because of abort (). Therefore, you must return the result before calling abort. You cannot call this function.
Ii. source code compilation
1. Configure the cross-compilation environment mingw + msys
You can
2. Run the msys console program.
3. Switch to the ffmepg source code directory (the command is the same as that in Linux)
4. Run./configure. The parameters are as follows:
./Configure -- enable-memalign-hack -- extra-cflags =-fno-common -- disable-decoders
-- Disable-encoders -- disable-muxers -- disable-demuxers -- disable-parsers -- disable-Protocols
-- Disable-BSFs -- disable-devices -- disable-filters -- disable-Network -- disable-ipv6
-- Disable-mpegaudio-HP -- enable-decoder = h264 -- enable-decoder = MJPEG
-- Enable-decoder = AAC -- enable-w32threads -- disable-Debug
5. Run make.
6. Copy the target file
Libavcodec.
Libavutil.
The above two files are static library files and copied to the SDK source code directory ffmpeg0.5/lib.
// FFMPEG/ffplay vc6 source code analysis
Http://www.cnblogs.com/mcodec/articles/1933754.html