Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Ffmpeg
提交
3644cb8f
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,发现更多精彩内容 >>
提交
3644cb8f
编写于
5月 12, 2006
作者:
M
Måns Rullgård
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
set stream time_base properly
Originally committed as revision 5367 to
svn://svn.ffmpeg.org/ffmpeg/trunk
上级
b8d10977
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
14 addition
and
9 deletion
+14
-9
libavformat/ogg2.c
libavformat/ogg2.c
+1
-5
libavformat/oggparseflac.c
libavformat/oggparseflac.c
+3
-0
libavformat/oggparseogm.c
libavformat/oggparseogm.c
+6
-1
libavformat/oggparsetheora.c
libavformat/oggparsetheora.c
+2
-3
libavformat/oggparsevorbis.c
libavformat/oggparsevorbis.c
+2
-0
未找到文件。
libavformat/ogg2.c
浏览文件 @
3644cb8f
...
...
@@ -432,15 +432,11 @@ ogg_gptopts (AVFormatContext * s, int i, uint64_t gp)
{
ogg_t
*
ogg
=
s
->
priv_data
;
ogg_stream_t
*
os
=
ogg
->
streams
+
i
;
AVStream
*
st
=
s
->
streams
[
i
];
AVCodecContext
*
codec
=
st
->
codec
;
uint64_t
pts
=
AV_NOPTS_VALUE
;
if
(
os
->
codec
->
gptopts
){
pts
=
os
->
codec
->
gptopts
(
s
,
i
,
gp
);
}
else
if
(
codec
->
codec_type
==
CODEC_TYPE_AUDIO
){
pts
=
gp
*
1000000LL
/
codec
->
sample_rate
;
}
else
if
(
codec
->
codec_type
==
CODEC_TYPE_VIDEO
){
}
else
{
pts
=
gp
;
}
...
...
libavformat/oggparseflac.c
浏览文件 @
3644cb8f
...
...
@@ -63,6 +63,9 @@ flac_header (AVFormatContext * s, int idx)
memcpy
(
st
->
codec
->
extradata
,
os
->
buf
+
os
->
pstart
+
5
+
4
+
4
+
4
,
FLAC_STREAMINFO_SIZE
);
st
->
codec
->
extradata_size
=
FLAC_STREAMINFO_SIZE
;
st
->
time_base
.
num
=
1
;
st
->
time_base
.
den
=
st
->
codec
->
sample_rate
;
}
else
if
(
mdt
==
4
)
{
vorbis_comment
(
s
,
os
->
buf
+
os
->
pstart
+
4
,
os
->
psize
-
4
);
}
...
...
libavformat/oggparseogm.c
浏览文件 @
3644cb8f
...
...
@@ -48,9 +48,12 @@ ogm_header(AVFormatContext *s, int idx)
p
++
;
if
(
*
p
==
'v'
){
int
tag
;
st
->
codec
->
codec_type
=
CODEC_TYPE_VIDEO
;
p
+=
8
;
st
->
codec
->
codec_id
=
codec_get_bmp_id
(
le2me_32
(
unaligned32
(
p
)));
tag
=
le2me_32
(
unaligned32
(
p
));
st
->
codec
->
codec_id
=
codec_get_bmp_id
(
tag
);
st
->
codec
->
codec_tag
=
tag
;
}
else
{
int
cid
;
st
->
codec
->
codec_type
=
CODEC_TYPE_AUDIO
;
...
...
@@ -85,6 +88,8 @@ ogm_header(AVFormatContext *s, int idx)
p
+=
2
;
/* block_align */
st
->
codec
->
bit_rate
=
le2me_32
(
unaligned32
(
p
))
*
8
;
st
->
codec
->
sample_rate
=
spu
*
10000000
/
time_unit
;
st
->
time_base
.
num
=
1
;
st
->
time_base
.
den
=
st
->
codec
->
sample_rate
;
}
return
1
;
...
...
libavformat/oggparsetheora.c
浏览文件 @
3644cb8f
...
...
@@ -79,6 +79,7 @@ theora_header (AVFormatContext * s, int idx)
skip_bits
(
&
gb
,
64
);
st
->
codec
->
time_base
.
den
=
get_bits
(
&
gb
,
32
);
st
->
codec
->
time_base
.
num
=
get_bits
(
&
gb
,
32
);
st
->
time_base
=
st
->
codec
->
time_base
;
st
->
codec
->
sample_aspect_ratio
.
num
=
get_bits
(
&
gb
,
24
);
st
->
codec
->
sample_aspect_ratio
.
den
=
get_bits
(
&
gb
,
24
);
...
...
@@ -111,15 +112,13 @@ theora_header (AVFormatContext * s, int idx)
static
uint64_t
theora_gptopts
(
AVFormatContext
*
ctx
,
int
idx
,
uint64_t
gp
)
{
AVStream
*
st
=
ctx
->
streams
[
idx
];
ogg_t
*
ogg
=
ctx
->
priv_data
;
ogg_stream_t
*
os
=
ogg
->
streams
+
idx
;
theora_params_t
*
thp
=
os
->
private
;
uint64_t
iframe
=
gp
>>
thp
->
gpshift
;
uint64_t
pframe
=
gp
&
thp
->
gpmask
;
return
(
iframe
+
pframe
)
*
AV_TIME_BASE
*
st
->
codec
->
time_base
.
num
/
st
->
codec
->
time_base
.
den
;
return
iframe
+
pframe
;
}
ogg_codec_t
theora_codec
=
{
...
...
libavformat/oggparsevorbis.c
浏览文件 @
3644cb8f
...
...
@@ -186,6 +186,8 @@ vorbis_header (AVFormatContext * s, int idx)
st
->
codec
->
codec_type
=
CODEC_TYPE_AUDIO
;
st
->
codec
->
codec_id
=
CODEC_ID_VORBIS
;
st
->
time_base
.
num
=
1
;
st
->
time_base
.
den
=
st
->
codec
->
sample_rate
;
}
else
if
(
os
->
buf
[
os
->
pstart
]
==
3
)
{
vorbis_comment
(
s
,
os
->
buf
+
os
->
pstart
+
7
,
os
->
psize
-
8
);
}
else
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录