Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Ffmpeg
提交
717a4509
F
Ffmpeg
项目概览
小白菜888
/
Ffmpeg
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
F
Ffmpeg
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
717a4509
编写于
10月 31, 2012
作者:
A
Anton Khirnov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
lavf: clarify the lifetime of demuxed packets.
上级
c8977f6d
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
16 addition
and
10 deletion
+16
-10
libavformat/avformat.h
libavformat/avformat.h
+16
-10
未找到文件。
libavformat/avformat.h
浏览文件 @
717a4509
...
...
@@ -158,9 +158,15 @@
* information will be in AVStream.time_base units, i.e. it has to be
* multiplied by the timebase to convert them to seconds.
*
* The packet data belongs to the demuxer and is invalid after the next call to
* av_read_frame(). The user must free the packet with av_free_packet() before
* calling av_read_frame() again or closing the file.
* If AVPacket.destruct is set on the returned packet, then the packet is
* allocated dynamically and the user may keep it indefinitely.
* Otherwise, if AVPacket.destruct is NULL, the packet data is backed by a
* static storage somewhere inside the demuxer and the packet is only valid
* until the next av_read_frame() call or closing the file. If the caller
* requires a longer lifetime, av_dup_packet() will make an av_malloc()ed copy
* of it.
* In both cases, the packet must be freed with av_free_packet() when it is no
* longer needed.
*
* @section lavf_decoding_seek Seeking
* @}
...
...
@@ -1307,13 +1313,13 @@ int av_read_packet(AVFormatContext *s, AVPacket *pkt);
* omit invalid data between valid frames so as to give the decoder the maximum
* information possible for decoding.
*
*
The returned packet is valid
*
until the next av_read_frame() or until av_close_input_file() an
d
*
must be freed with av_free_packet. For video, the packet contains
*
exactly one frame. For audio, it contains an integer number of
*
frames if each frame has a known fixed size (e.g. PCM or ADPCM
*
data). If the audio frames have a variable size (e.g. MPEG audio),
* then it contains one frame.
*
If pkt->destruct is NULL, then the packet is valid until the next
*
av_read_frame() or until av_close_input_file(). Otherwise the packet is vali
d
*
indefinitely. In both cases the packet must be freed with
*
av_free_packet when it is no longer needed. For video, the packet contains
*
exactly one frame. For audio, it contains an integer number of frames if each
*
frame has a known fixed size (e.g. PCM or ADPCM data). If the audio frames
*
have a variable size (e.g. MPEG audio),
then it contains one frame.
*
* pkt->pts, pkt->dts and pkt->duration are always set to correct
* values in AVStream.time_base units (and guessed if the format cannot
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录