Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Ffmpeg
提交
5603df39
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,发现更多精彩内容 >>
提交
5603df39
编写于
1月 31, 2011
作者:
R
Reimar Döffinger
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Always use av_set_pts_info to set the stream time base.
上级
d947bce1
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
12 addition
and
16 deletion
+12
-16
libavformat/c93.c
libavformat/c93.c
+1
-1
libavformat/oggparsedirac.c
libavformat/oggparsedirac.c
+2
-3
libavformat/oggparseflac.c
libavformat/oggparseflac.c
+1
-2
libavformat/oggparseogm.c
libavformat/oggparseogm.c
+2
-3
libavformat/oggparseskeleton.c
libavformat/oggparseskeleton.c
+3
-2
libavformat/oggparsespeex.c
libavformat/oggparsespeex.c
+1
-2
libavformat/oggparsetheora.c
libavformat/oggparsetheora.c
+1
-1
libavformat/oggparsevorbis.c
libavformat/oggparsevorbis.c
+1
-2
未找到文件。
libavformat/c93.c
浏览文件 @
5603df39
...
...
@@ -89,7 +89,7 @@ static int read_header(AVFormatContext *s,
video
->
codec
->
height
=
192
;
/* 4:3 320x200 with 8 empty lines */
video
->
sample_aspect_ratio
=
(
AVRational
)
{
5
,
6
};
video
->
time_base
=
(
AVRational
)
{
2
,
25
}
;
av_set_pts_info
(
video
,
64
,
2
,
25
)
;
video
->
nb_frames
=
framecount
;
video
->
duration
=
framecount
;
video
->
start_time
=
0
;
...
...
libavformat/oggparsedirac.c
浏览文件 @
5603df39
...
...
@@ -42,7 +42,7 @@ static int dirac_header(AVFormatContext *s, int idx)
st
->
codec
->
codec_type
=
AVMEDIA_TYPE_VIDEO
;
st
->
codec
->
codec_id
=
CODEC_ID_DIRAC
;
// dirac in ogg always stores timestamps as though the video were interlaced
st
->
time_base
=
(
AVRational
){
st
->
codec
->
time_base
.
num
,
2
*
st
->
codec
->
time_base
.
den
}
;
av_set_pts_info
(
st
,
64
,
st
->
codec
->
time_base
.
num
,
2
*
st
->
codec
->
time_base
.
den
)
;
return
1
;
}
...
...
@@ -79,8 +79,7 @@ static int old_dirac_header(AVFormatContext *s, int idx)
st
->
codec
->
codec_type
=
AVMEDIA_TYPE_VIDEO
;
st
->
codec
->
codec_id
=
CODEC_ID_DIRAC
;
st
->
time_base
.
den
=
AV_RB32
(
buf
+
8
);
st
->
time_base
.
num
=
AV_RB32
(
buf
+
12
);
av_set_pts_info
(
st
,
64
,
AV_RB32
(
buf
+
12
),
AV_RB32
(
buf
+
8
));
return
1
;
}
...
...
libavformat/oggparseflac.c
浏览文件 @
5603df39
...
...
@@ -65,8 +65,7 @@ flac_header (AVFormatContext * s, int idx)
memcpy
(
st
->
codec
->
extradata
,
streaminfo_start
,
FLAC_STREAMINFO_SIZE
);
st
->
codec
->
extradata_size
=
FLAC_STREAMINFO_SIZE
;
st
->
time_base
.
num
=
1
;
st
->
time_base
.
den
=
st
->
codec
->
sample_rate
;
av_set_pts_info
(
st
,
64
,
1
,
st
->
codec
->
sample_rate
);
}
else
if
(
mdt
==
FLAC_METADATA_TYPE_VORBIS_COMMENT
)
{
ff_vorbis_comment
(
s
,
&
st
->
metadata
,
os
->
buf
+
os
->
pstart
+
4
,
os
->
psize
-
4
);
}
...
...
libavformat/oggparseogm.c
浏览文件 @
5603df39
...
...
@@ -83,14 +83,13 @@ ogm_header(AVFormatContext *s, int idx)
st
->
codec
->
height
=
bytestream_get_le32
(
&
p
);
st
->
codec
->
time_base
.
den
=
spu
*
10000000
;
st
->
codec
->
time_base
.
num
=
time_unit
;
st
->
time_base
=
st
->
codec
->
time_base
;
av_set_pts_info
(
st
,
64
,
st
->
codec
->
time_base
.
num
,
st
->
codec
->
time_base
.
den
)
;
}
else
{
st
->
codec
->
channels
=
bytestream_get_le16
(
&
p
);
p
+=
2
;
/* block_align */
st
->
codec
->
bit_rate
=
bytestream_get_le32
(
&
p
)
*
8
;
st
->
codec
->
sample_rate
=
spu
*
10000000
/
time_unit
;
st
->
time_base
.
num
=
1
;
st
->
time_base
.
den
=
st
->
codec
->
sample_rate
;
av_set_pts_info
(
st
,
64
,
1
,
st
->
codec
->
sample_rate
);
}
}
else
if
(
*
p
==
3
)
{
if
(
os
->
psize
>
8
)
...
...
libavformat/oggparseskeleton.c
浏览文件 @
5603df39
...
...
@@ -60,8 +60,9 @@ static int skeleton_header(AVFormatContext *s, int idx)
start_den
=
AV_RL64
(
buf
+
20
);
if
(
start_den
)
{
av_reduce
(
&
start_time
,
&
st
->
time_base
.
den
,
start_num
,
start_den
,
INT_MAX
);
st
->
time_base
.
num
=
1
;
int64_t
base_den
;
av_reduce
(
&
start_time
,
&
base_den
,
start_num
,
start_den
,
INT_MAX
);
av_set_pts_info
(
st
,
64
,
1
,
base_den
);
os
->
lastpts
=
st
->
start_time
=
start_time
;
}
...
...
libavformat/oggparsespeex.c
浏览文件 @
5603df39
...
...
@@ -72,8 +72,7 @@ static int speex_header(AVFormatContext *s, int idx) {
+
FF_INPUT_BUFFER_PADDING_SIZE
);
memcpy
(
st
->
codec
->
extradata
,
p
,
st
->
codec
->
extradata_size
);
st
->
time_base
.
num
=
1
;
st
->
time_base
.
den
=
st
->
codec
->
sample_rate
;
av_set_pts_info
(
st
,
64
,
1
,
st
->
codec
->
sample_rate
);
}
else
ff_vorbis_comment
(
s
,
&
st
->
metadata
,
p
,
os
->
psize
);
...
...
libavformat/oggparsetheora.c
浏览文件 @
5603df39
...
...
@@ -91,7 +91,7 @@ theora_header (AVFormatContext * s, int idx)
st
->
codec
->
time_base
.
num
=
1
;
st
->
codec
->
time_base
.
den
=
25
;
}
st
->
time_base
=
st
->
codec
->
time_base
;
av_set_pts_info
(
st
,
64
,
st
->
codec
->
time_base
.
num
,
st
->
codec
->
time_base
.
den
)
;
st
->
sample_aspect_ratio
.
num
=
get_bits_long
(
&
gb
,
24
);
st
->
sample_aspect_ratio
.
den
=
get_bits_long
(
&
gb
,
24
);
...
...
libavformat/oggparsevorbis.c
浏览文件 @
5603df39
...
...
@@ -252,8 +252,7 @@ vorbis_header (AVFormatContext * s, int idx)
if
(
srate
>
0
)
{
st
->
codec
->
sample_rate
=
srate
;
st
->
time_base
.
num
=
1
;
st
->
time_base
.
den
=
srate
;
av_set_pts_info
(
st
,
64
,
1
,
srate
);
}
}
else
if
(
os
->
buf
[
os
->
pstart
]
==
3
)
{
if
(
os
->
psize
>
8
&&
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录