Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Ffmpeg
提交
bd5a6020
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,发现更多精彩内容 >>
提交
bd5a6020
编写于
8月 18, 2003
作者:
M
Michael Niedermayer
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
use codec_tag for encoding too
Originally committed as revision 2125 to
svn://svn.ffmpeg.org/ffmpeg/trunk
上级
f8188626
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
23 addition
and
12 deletion
+23
-12
libavcodec/avcodec.h
libavcodec/avcodec.h
+1
-1
libavformat/asf.c
libavformat/asf.c
+12
-2
libavformat/au.c
libavformat/au.c
+4
-5
libavformat/wav.c
libavformat/wav.c
+6
-4
未找到文件。
libavcodec/avcodec.h
浏览文件 @
bd5a6020
...
...
@@ -611,7 +611,7 @@ typedef struct AVCodecContext {
/**
* fourcc (LSB first, so "ABCD" -> ('D'<<24) + ('C'<<16) + ('B'<<8) + 'A').
* this is used to workaround some encoder bugs
* - encoding:
un
used
* - encoding:
set by user, if not then the default based on codec_id will be
used
* - decoding: set by user, will be converted to upper case by lavc during init
*/
unsigned
int
codec_tag
;
...
...
libavformat/asf.c
浏览文件 @
bd5a6020
...
...
@@ -411,13 +411,23 @@ static int asf_write_header1(AVFormatContext *s, int64_t file_size, int64_t data
put_le16
(
pb
,
asf
->
streams
[
n
].
num
);
put_str16
(
pb
,
p
?
p
->
name
:
enc
->
codec_name
);
put_le16
(
pb
,
0
);
/* no parameters */
/* id */
if
(
enc
->
codec_type
==
CODEC_TYPE_AUDIO
)
{
put_le16
(
pb
,
2
);
put_le16
(
pb
,
codec_get_tag
(
codec_wav_tags
,
enc
->
codec_id
));
if
(
!
enc
->
codec_tag
)
enc
->
codec_tag
=
codec_get_tag
(
codec_wav_tags
,
enc
->
codec_id
);
if
(
!
enc
->
codec_tag
)
return
-
1
;
put_le16
(
pb
,
enc
->
codec_tag
);
}
else
{
put_le16
(
pb
,
4
);
put_le32
(
pb
,
codec_get_tag
(
codec_bmp_tags
,
enc
->
codec_id
));
if
(
!
enc
->
codec_tag
)
enc
->
codec_tag
=
codec_get_tag
(
codec_bmp_tags
,
enc
->
codec_id
);
if
(
!
enc
->
codec_tag
)
return
-
1
;
put_le32
(
pb
,
enc
->
codec_tag
);
}
}
end_header
(
pb
,
hpos
);
...
...
libavformat/au.c
浏览文件 @
bd5a6020
...
...
@@ -42,15 +42,14 @@ static const CodecTag codec_au_tags[] = {
/* AUDIO_FILE header */
static
int
put_au_header
(
ByteIOContext
*
pb
,
AVCodecContext
*
enc
)
{
int
tag
;
tag
=
codec_get_tag
(
codec_au_tags
,
enc
->
codec_id
);
if
(
tag
==
0
)
if
(
!
enc
->
codec_tag
)
enc
->
codec_tag
=
codec_get_tag
(
codec_au_tags
,
enc
->
codec_id
);
if
(
!
enc
->
codec_tag
)
return
-
1
;
put_tag
(
pb
,
".snd"
);
/* magic number */
put_be32
(
pb
,
24
);
/* header size */
put_be32
(
pb
,
AU_UNKOWN_SIZE
);
/* data size */
put_be32
(
pb
,
(
uint32_t
)
tag
);
/* codec ID */
put_be32
(
pb
,
(
uint32_t
)
enc
->
codec_
tag
);
/* codec ID */
put_be32
(
pb
,
enc
->
sample_rate
);
put_be32
(
pb
,
(
uint32_t
)
enc
->
channels
);
return
0
;
...
...
libavformat/wav.c
浏览文件 @
bd5a6020
...
...
@@ -38,13 +38,15 @@ const CodecTag codec_wav_tags[] = {
/* returns the size or -1 on error */
int
put_wav_header
(
ByteIOContext
*
pb
,
AVCodecContext
*
enc
)
{
int
tag
,
bps
,
blkalign
,
bytespersec
;
int
bps
,
blkalign
,
bytespersec
;
int
hdrsize
=
18
;
tag
=
codec_get_tag
(
codec_wav_tags
,
enc
->
codec_id
);
if
(
tag
==
0
)
if
(
!
enc
->
codec_tag
)
enc
->
codec_tag
=
codec_get_tag
(
codec_wav_tags
,
enc
->
codec_id
);
if
(
!
enc
->
codec_tag
)
return
-
1
;
put_le16
(
pb
,
tag
);
put_le16
(
pb
,
enc
->
codec_tag
);
put_le16
(
pb
,
enc
->
channels
);
put_le32
(
pb
,
enc
->
sample_rate
);
if
(
enc
->
codec_id
==
CODEC_ID_PCM_U8
||
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录