当前位置:网站首页>Avframe Memory Management API
Avframe Memory Management API
2022-06-28 08:34:00 【,,,, Nanshan light rain】
int av_frame_ref(AVFrame *dst, const AVFrame *src)
It's like copying ,src Copied to the dst, But it's just that src The reference of the data inside is added 1, Then add the reference to dst in
AVFrame *av_frame_clone(const AVFrame *src);
Work with av_frame_ref similar , increase src Reference count of , But it will also initialize av_frame_clone object
void av_frame_unref(AVFrame* frame)
take frame The reference count is subtracted by one .
av_frame_free(): Release AVFrame Structure space of . This function is interesting . Because it not only frees up the space of the structure , Also involves AVFrame Medium uint8_t *data[AV_NUM_DATA_POINTERS]; Field release problem ., If AVFrame Medium uint8_t *data[AV_NUM_DATA_POINTERS] Citation in ==1, Then release data Space .
av_frame_unref() Function is for frame Of buf Array One by one call av_buffer_unref().av_buffer_unref I told you before . Is that the reference count becomes 0, Let go data, Otherwise, only the memory of the structure itself will be released . Be careful , Premise is buf[i] It can't be null.
void av_frame_unref(AVFrame *frame)
{
int i;
if (!frame)
return;
wipe_side_data(frame);
for (i = 0; i < FF_ARRAY_ELEMS(frame->buf); i++)
av_buffer_unref(&frame->buf[i]);
for (i = 0; i < frame->nb_extended_buf; i++)
av_buffer_unref(&frame->extended_buf[i]);
av_freep(&frame->extended_buf);
av_dict_free(&frame->metadata);
#if FF_API_FRAME_QP
FF_DISABLE_DEPRECATION_WARNINGS
av_buffer_unref(&frame->qp_table_buf);
FF_ENABLE_DEPRECATION_WARNINGS
#endif
av_buffer_unref(&frame->hw_frames_ctx);
av_buffer_unref(&frame->opaque_ref);
av_buffer_unref(&frame->private_ref);
get_frame_defaults(frame);
}
————————————————
Copyright notice : This paper is about CSDN Blogger 「oooooome」 The original article of , follow CC 4.0 BY-SA Copyright agreement , For reprint, please attach the original source link and this statement .
Link to the original text :https://blog.csdn.net/oooooome/article/details/111993911
https://blog.csdn.net/oooooome/article/details/111993911?ops_request_misc=&request_id=&biz_id=102&utm_term=av_frame_unref&utm_medium=distribute.pc_search_result.none-task-blog-2allsobaiduweb~default-7-111993911.nonecase&spm=1018.2226.3001.4187
边栏推荐
- The maximum number of Rac open file descriptors, and the processing of hard check failure
- AWS builds a virtual infrastructure including servers and networks (2)
- AI chief architect 8-aica-gao Xiang, in-depth understanding and practice of propeller 2.0
- Redis deployment under Linux & redis startup
- 【.NET6】gRPC服务端和客户端开发案例,以及minimal API服务、gRPC服务和传统webapi服务的访问效率大对决
- 887. egg drop
- Kubernetes notes and the latest k3s installation introduction
- 【转载】STM32 GPIO类型
- Oracle view tablespace usage
- 找合适的PMP机构只需2步搞定,一查二问
猜你喜欢
![[untitled]](/img/bb/213f213c695795daecb81a4cf2adcd.jpg)
[untitled]
![DELL R730服务器开机报错:[XXX] usb 1-1-port4: disabled by hub (EMI?), re-enabling...](/img/90/425965ca4b3df3656ce2a5f4230c4b.jpg)
DELL R730服务器开机报错:[XXX] usb 1-1-port4: disabled by hub (EMI?), re-enabling...

The maximum number of Rac open file descriptors, and the processing of hard check failure

JS rounding tips

js取整的小技巧

App automated testing appium Tutorial Part 1 - advanced supplementary content

如何抑制SiC MOSFET Crosstalk(串擾)?

MySQL8.0 忘记 root 密码

块级元素上下左右居中的两个小技巧

抖音服務器帶寬有多大,才能供上億人同時刷?
随机推荐
Selenium+chromedriver cannot open Google browser page
Leetcode swing series
What is the bandwidth of the Tiktok server that can be used by hundreds of millions of people at the same time?
【.NET6】gRPC服务端和客户端开发案例,以及minimal API服务、gRPC服务和传统webapi服务的访问效率大对决
Superimposed ladder diagram and line diagram and merged line diagram and needle diagram
Two tips for block level elements
Sword finger offer 03 Duplicate number in array
RAC enable archive log
Oracle view all tablespaces in the current library
如何抑制SiC MOSFET Crosstalk(串扰)?
webrtc优势与模块拆分
How do people over 40 allocate annuity insurance? Which product is more suitable?
npm清理缓存
How to choose an account opening broker? Is it safe to open an account online?
Idea related issues
The 6th smart home Asia 2022 will be held in Shanghai in October
Basic twelve style classes for duilib
Priority of JS operator
FFMpeg (一) av_register_all()
[go ~ 0 to 1] the third day June 27 slice, map and function