当前位置:网站首页>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
边栏推荐
- Robot Rapping Results Report
- The preliminary round of the sixth season of 2022 perfect children's model Foshan competition area came to a successful conclusion
- Comment supprimer le crosstalk SiC MOSFET?
- Trailing Zeroes (II)
- 隐私计算FATE-----离线预测
- Force buckle 1884 Egg drop - two eggs
- 利尔达低代码数据大屏,铲平数据应用开发门槛
- The maximum number of Rac open file descriptors, and the processing of hard check failure
- PLSQL installation under Windows
- PC端隐藏滚动条
猜你喜欢

AWS builds a virtual infrastructure including servers and networks (2)

DB

App automated testing appium Tutorial Part 1 - advanced supplementary content

罗氏线圈可以测量的大电流和频率范围

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

安装nrm后,使用nrm命令报错internal/validators.js:124 throw new ERR_INVALID_ARG_TYPE(name, ‘string‘, value)

Mysql8.0 forgot the root password

Set the icon for the title section of the page

【云原生 | Kubernetes篇】深入了解Pod(六)

Two tips for block level elements
随机推荐
AVFrame内存管理api
B_ QuRT_ User_ Guide(26)
Kubernetes notes and the latest k3s installation introduction
Why are function templates not partial specialization?
设置网页的标题部分的图标
The maximum number of Rac open file descriptors, and the processing of hard check failure
Loss loss function
Resolution of Rac grid failure to start after server restart
FFMpeg (一) av_register_all()
如何抑制SiC MOSFET Crosstalk(串扰)?
How to choose an account opening broker? Is it safe to open an account online?
关于如何在placeholder中使用字体图标
Build an integrated kubernetes in Fedora
[learning notes] linear basis
Solve NPM err! Unexpected end of JSON input while parsing near
开户券商怎么选择?网上开户是否安全么?
隐私计算FATE-----离线预测
Selenium+chromedriver cannot open Google browser page
探讨gis三维系统在矿山行业中的应用
新唐NUC980使用记录:自制开发板(基于NUC980DK61YC)