Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Ffmpeg
提交
f1caf01d
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,发现更多精彩内容 >>
提交
f1caf01d
编写于
1月 20, 2012
作者:
M
Martin Storsjö
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
libavformat: Add a flag for muxers that support write_packet(NULL) for flushing
Signed-off-by:
N
Martin Storsjö
<
martin@martin.st
>
上级
83988d58
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
25 addition
and
5 deletion
+25
-5
libavformat/avformat.h
libavformat/avformat.h
+15
-3
libavformat/utils.c
libavformat/utils.c
+9
-1
libavformat/version.h
libavformat/version.h
+1
-1
未找到文件。
libavformat/avformat.h
浏览文件 @
f1caf01d
...
...
@@ -380,6 +380,7 @@ typedef struct AVFormatParameters {
#define AVFMT_NOBINSEARCH 0x2000
/**< Format does not allow to fallback to binary search via read_timestamp */
#define AVFMT_NOGENSEARCH 0x4000
/**< Format does not allow to fallback to generic search */
#define AVFMT_NO_BYTE_SEEK 0x8000
/**< Format does not allow seeking by bytes */
#define AVFMT_ALLOW_FLUSH 0x10000
/**< Format allows flushing. If not set, the muxer will not receive a NULL packet in the write_packet function. */
/**
* @addtogroup lavf_encoding
...
...
@@ -403,12 +404,19 @@ typedef struct AVOutputFormat {
enum
CodecID
audio_codec
;
/**< default audio codec */
enum
CodecID
video_codec
;
/**< default video codec */
int
(
*
write_header
)(
struct
AVFormatContext
*
);
/**
* Write a packet. If AVFMT_ALLOW_FLUSH is set in flags,
* pkt can be NULL in order to flush data buffered in the muxer.
* When flushing, return 0 if there still is more data to flush,
* or 1 if everything was flushed and there is no more buffered
* data.
*/
int
(
*
write_packet
)(
struct
AVFormatContext
*
,
AVPacket
*
pkt
);
int
(
*
write_trailer
)(
struct
AVFormatContext
*
);
/**
* can use flags: AVFMT_NOFILE, AVFMT_NEEDNUMBER, AVFMT_RAWPICTURE,
* AVFMT_GLOBALHEADER, AVFMT_NOTIMESTAMPS, AVFMT_VARIABLE_FPS,
* AVFMT_NODIMENSIONS, AVFMT_NOSTREAMS
* AVFMT_NODIMENSIONS, AVFMT_NOSTREAMS
, AVFMT_ALLOW_FLUSH
*/
int
flags
;
/**
...
...
@@ -1685,8 +1693,12 @@ attribute_deprecated int av_write_header(AVFormatContext *s);
*
* @param s media file handle
* @param pkt The packet, which contains the stream_index, buf/buf_size,
dts/pts, ...
* @return < 0 on error, = 0 if OK, 1 if end of stream wanted
* dts/pts, ...
* This can be NULL (at any time, not just at the end), in
* order to immediately flush data buffered within the muxer,
* for muxers that buffer up data internally before writing it
* to the output.
* @return < 0 on error, = 0 if OK, 1 if flushed and there is no more data to flush
*/
int
av_write_frame
(
AVFormatContext
*
s
,
AVPacket
*
pkt
);
...
...
libavformat/utils.c
浏览文件 @
f1caf01d
...
...
@@ -3135,7 +3135,15 @@ static int compute_pkt_fields2(AVFormatContext *s, AVStream *st, AVPacket *pkt){
int
av_write_frame
(
AVFormatContext
*
s
,
AVPacket
*
pkt
)
{
int
ret
=
compute_pkt_fields2
(
s
,
s
->
streams
[
pkt
->
stream_index
],
pkt
);
int
ret
;
if
(
!
pkt
)
{
if
(
s
->
oformat
->
flags
&
AVFMT_ALLOW_FLUSH
)
return
s
->
oformat
->
write_packet
(
s
,
pkt
);
return
1
;
}
ret
=
compute_pkt_fields2
(
s
,
s
->
streams
[
pkt
->
stream_index
],
pkt
);
if
(
ret
<
0
&&
!
(
s
->
oformat
->
flags
&
AVFMT_NOTIMESTAMPS
))
return
ret
;
...
...
libavformat/version.h
浏览文件 @
f1caf01d
...
...
@@ -30,7 +30,7 @@
#include "libavutil/avutil.h"
#define LIBAVFORMAT_VERSION_MAJOR 53
#define LIBAVFORMAT_VERSION_MINOR 2
1
#define LIBAVFORMAT_VERSION_MINOR 2
2
#define LIBAVFORMAT_VERSION_MICRO 0
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录