FFmpeg源代码简单分析:常见结构体的初始化和销毁(AVFormatContext,AVFrame等)
结构体 |
初始化 |
销毁 |
AVFormatContext |
avformat_alloc_context() |
avformat_free_context() |
AVIOContext |
avio_alloc_context() |
|
AVStream |
avformat_new_stream() |
|
AVCodecContext |
avcodec_alloc_context3() |
|
AVFrame |
av_frame_alloc(); av_image_fill_arrays() |
av_frame_free() |
AVPacket |
av_init_packet(); av_new_packet() |
av_free_packet() |
具体参考:http://www.voidcn.com/article/p-uksjchlk-bgz.html