Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Ffmpeg
提交
4a712c33
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,发现更多精彩内容 >>
提交
4a712c33
编写于
5月 27, 2008
作者:
B
Baptiste Coudurier
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
simplify and use version instead
Originally committed as revision 13459 to
svn://svn.ffmpeg.org/ffmpeg/trunk
上级
6ef445fe
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
10 addition
and
9 deletion
+10
-9
libavformat/swfenc.c
libavformat/swfenc.c
+10
-9
未找到文件。
libavformat/swfenc.c
浏览文件 @
4a712c33
...
...
@@ -178,7 +178,7 @@ static int swf_write_header(AVFormatContext *s)
PutBitContext
p
;
uint8_t
buf1
[
256
];
int
i
,
width
,
height
,
rate
,
rate_base
;
int
is_avm2
;
int
version
;
swf
->
audio_in_pos
=
0
;
swf
->
sound_samples
=
0
;
...
...
@@ -235,17 +235,18 @@ static int swf_write_header(AVFormatContext *s)
swf
->
samples_per_frame
=
(
audio_enc
->
sample_rate
*
rate_base
)
/
rate
;
}
is_avm2
=
!
strcmp
(
"avm2"
,
s
->
oformat
->
name
);
put_tag
(
pb
,
"FWS"
);
if
(
is_avm2
)
put_byte
(
pb
,
9
);
if
(
!
strcmp
(
"avm2"
,
s
->
oformat
->
name
))
version
=
9
;
else
if
(
video_enc
&&
video_enc
->
codec_id
==
CODEC_ID_VP6F
)
put_byte
(
pb
,
8
);
/* version (version 8 and above support VP6 codec)
*/
version
=
8
;
/* version 8 and above support VP6 codec
*/
else
if
(
video_enc
&&
video_enc
->
codec_id
==
CODEC_ID_FLV1
)
put_byte
(
pb
,
6
);
/* version (version 6 and above support FLV1 codec)
*/
version
=
6
;
/* version 6 and above support FLV1 codec
*/
else
put_byte
(
pb
,
4
);
/* version (should use 4 for mpeg audio support) */
version
=
4
;
/* version 4 for mpeg audio support */
put_byte
(
pb
,
version
);
put_le32
(
pb
,
DUMMY_FILE_SIZE
);
/* dummy size
(will be patched if not streamed) */
...
...
@@ -255,7 +256,7 @@ static int swf_write_header(AVFormatContext *s)
put_le16
(
pb
,
(
uint16_t
)(
DUMMY_DURATION
*
(
int64_t
)
rate
/
rate_base
));
/* frame count */
/* avm2/swf v9 (also v8?) files require a file attribute tag */
if
(
is_avm2
)
{
if
(
version
==
9
)
{
put_swf_tag
(
s
,
TAG_FILEATTRIBUTES
);
put_le32
(
pb
,
1
<<
3
);
/* set ActionScript v3/AVM2 flag */
put_swf_end_tag
(
s
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录