当前位置:网站首页>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
边栏推荐
- AWS saves data on the cloud (3)
- 微内核Zephyr获众多厂家支持!
- [untitled]
- Ffmpeg (I) AV_ register_ all()
- Two tips for block level elements
- Quelle est la largeur de bande du serveur de bavardage sonore pour des centaines de millions de personnes en même temps?
- Wasmedge 0.10.0 release! New plug-in extension mechanism, socket API enhancement, llvm 14 support
- AI chief architect 8-aica-gao Xiang, in-depth understanding and practice of propeller 2.0
- B_ QuRT_ User_ Guide(28)
- Robot Rapping Results Report
猜你喜欢

Unity gets the coordinate point in front of the current object at a certain angle and distance

Idea related issues

找合适的PMP机构只需2步搞定,一查二问

叠加阶梯图和线图及合并线图和针状图

B_ QuRT_ User_ Guide(28)
![Dell r730 server startup error: [xxx] USB 1-1-port4: disabled by hub (EMI?), re-enabling...](/img/90/425965ca4b3df3656ce2a5f4230c4b.jpg)
Dell r730 server startup error: [xxx] USB 1-1-port4: disabled by hub (EMI?), re-enabling...

The micro kernel zephyr is supported by many manufacturers!

爱分析发布《2022爱分析 · IT运维厂商全景报告》 安超云强势入选!
![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...

App automated testing appium Tutorial Part 1 - advanced supplementary content
随机推荐
[untitled]
Loss loss function
[learning notes] linear basis
Kali Notes(1)
利尔达低代码数据大屏,铲平数据应用开发门槛
About using font icons in placeholder
11grac turn off archive log
How do people over 40 allocate annuity insurance? Which product is more suitable?
整数划分
Why MySQL cannot insert Chinese data in CMD
RAC enable archive log
Basic twelve style classes for duilib
Unity - use of API related to Pico development input system ---c
新唐NUC980使用记录:自制开发板(基于NUC980DK61YC)
887. egg drop
[introduction to SQL in 10 days] day5+6 consolidated table
【转载】STM32 GPIO类型
爱分析发布《2022爱分析 · IT运维厂商全景报告》 安超云强势入选!
centos mysql5.5配置文件在哪
Super Jumping! Jumping! Jumping!