Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
云duo
FFmpeg
提交
2ba68dd0
F
FFmpeg
项目概览
云duo
/
FFmpeg
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
F
FFmpeg
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
2ba68dd0
编写于
10月 27, 2013
作者:
A
Anton Khirnov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
lavf: remove unreliable timestamp guessing heuristic
上级
f2521563
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
0 addition
and
34 deletion
+0
-34
libavformat/avformat.h
libavformat/avformat.h
+0
-8
libavformat/seek.c
libavformat/seek.c
+0
-3
libavformat/seek.h
libavformat/seek.h
+0
-1
libavformat/utils.c
libavformat/utils.c
+0
-22
未找到文件。
libavformat/avformat.h
浏览文件 @
2ba68dd0
...
@@ -730,14 +730,6 @@ typedef struct AVStream {
...
@@ -730,14 +730,6 @@ typedef struct AVStream {
int
pts_wrap_bits
;
/**< number of bits in pts (used for wrapping control) */
int
pts_wrap_bits
;
/**< number of bits in pts (used for wrapping control) */
// Timestamp generation support:
// Timestamp generation support:
/**
* Timestamp corresponding to the last dts sync point.
*
* Initialized when AVCodecParserContext.dts_sync_point >= 0 and
* a DTS is received from the underlying container. Otherwise set to
* AV_NOPTS_VALUE by default.
*/
int64_t
reference_dts
;
int64_t
first_dts
;
int64_t
first_dts
;
int64_t
cur_dts
;
int64_t
cur_dts
;
int64_t
last_IP_pts
;
int64_t
last_IP_pts
;
...
...
libavformat/seek.c
浏览文件 @
2ba68dd0
...
@@ -428,13 +428,11 @@ AVParserState *ff_store_parser_state(AVFormatContext *s)
...
@@ -428,13 +428,11 @@ AVParserState *ff_store_parser_state(AVFormatContext *s)
ss
->
parser
=
st
->
parser
;
ss
->
parser
=
st
->
parser
;
ss
->
last_IP_pts
=
st
->
last_IP_pts
;
ss
->
last_IP_pts
=
st
->
last_IP_pts
;
ss
->
cur_dts
=
st
->
cur_dts
;
ss
->
cur_dts
=
st
->
cur_dts
;
ss
->
reference_dts
=
st
->
reference_dts
;
ss
->
probe_packets
=
st
->
probe_packets
;
ss
->
probe_packets
=
st
->
probe_packets
;
st
->
parser
=
NULL
;
st
->
parser
=
NULL
;
st
->
last_IP_pts
=
AV_NOPTS_VALUE
;
st
->
last_IP_pts
=
AV_NOPTS_VALUE
;
st
->
cur_dts
=
AV_NOPTS_VALUE
;
st
->
cur_dts
=
AV_NOPTS_VALUE
;
st
->
reference_dts
=
AV_NOPTS_VALUE
;
st
->
probe_packets
=
MAX_PROBE_PACKETS
;
st
->
probe_packets
=
MAX_PROBE_PACKETS
;
}
}
...
@@ -467,7 +465,6 @@ void ff_restore_parser_state(AVFormatContext *s, AVParserState *state)
...
@@ -467,7 +465,6 @@ void ff_restore_parser_state(AVFormatContext *s, AVParserState *state)
st
->
parser
=
ss
->
parser
;
st
->
parser
=
ss
->
parser
;
st
->
last_IP_pts
=
ss
->
last_IP_pts
;
st
->
last_IP_pts
=
ss
->
last_IP_pts
;
st
->
cur_dts
=
ss
->
cur_dts
;
st
->
cur_dts
=
ss
->
cur_dts
;
st
->
reference_dts
=
ss
->
reference_dts
;
st
->
probe_packets
=
ss
->
probe_packets
;
st
->
probe_packets
=
ss
->
probe_packets
;
}
}
...
...
libavformat/seek.h
浏览文件 @
2ba68dd0
...
@@ -33,7 +33,6 @@ typedef struct AVParserStreamState {
...
@@ -33,7 +33,6 @@ typedef struct AVParserStreamState {
AVCodecParserContext
*
parser
;
AVCodecParserContext
*
parser
;
int64_t
last_IP_pts
;
int64_t
last_IP_pts
;
int64_t
cur_dts
;
int64_t
cur_dts
;
int64_t
reference_dts
;
int
probe_packets
;
int
probe_packets
;
}
AVParserStreamState
;
}
AVParserStreamState
;
...
...
libavformat/utils.c
浏览文件 @
2ba68dd0
...
@@ -771,25 +771,6 @@ static void compute_pkt_fields(AVFormatContext *s, AVStream *st,
...
@@ -771,25 +771,6 @@ static void compute_pkt_fields(AVFormatContext *s, AVStream *st,
pkt
->
dts
+=
offset
;
pkt
->
dts
+=
offset
;
}
}
if
(
pc
&&
pc
->
dts_sync_point
>=
0
)
{
// we have synchronization info from the parser
int64_t
den
=
st
->
codec
->
time_base
.
den
*
(
int64_t
)
st
->
time_base
.
num
;
if
(
den
>
0
)
{
int64_t
num
=
st
->
codec
->
time_base
.
num
*
(
int64_t
)
st
->
time_base
.
den
;
if
(
pkt
->
dts
!=
AV_NOPTS_VALUE
)
{
// got DTS from the stream, update reference timestamp
st
->
reference_dts
=
pkt
->
dts
-
pc
->
dts_ref_dts_delta
*
num
/
den
;
pkt
->
pts
=
pkt
->
dts
+
pc
->
pts_dts_delta
*
num
/
den
;
}
else
if
(
st
->
reference_dts
!=
AV_NOPTS_VALUE
)
{
// compute DTS based on reference timestamp
pkt
->
dts
=
st
->
reference_dts
+
pc
->
dts_ref_dts_delta
*
num
/
den
;
pkt
->
pts
=
pkt
->
dts
+
pc
->
pts_dts_delta
*
num
/
den
;
}
if
(
pc
->
dts_sync_point
>
0
)
st
->
reference_dts
=
pkt
->
dts
;
// new reference
}
}
/* This may be redundant, but it should not hurt. */
/* This may be redundant, but it should not hurt. */
if
(
pkt
->
dts
!=
AV_NOPTS_VALUE
&&
pkt
->
pts
!=
AV_NOPTS_VALUE
&&
pkt
->
pts
>
pkt
->
dts
)
if
(
pkt
->
dts
!=
AV_NOPTS_VALUE
&&
pkt
->
pts
!=
AV_NOPTS_VALUE
&&
pkt
->
pts
>
pkt
->
dts
)
presentation_delayed
=
1
;
presentation_delayed
=
1
;
...
@@ -1214,7 +1195,6 @@ void ff_read_frame_flush(AVFormatContext *s)
...
@@ -1214,7 +1195,6 @@ void ff_read_frame_flush(AVFormatContext *s)
}
}
st
->
last_IP_pts
=
AV_NOPTS_VALUE
;
st
->
last_IP_pts
=
AV_NOPTS_VALUE
;
st
->
cur_dts
=
AV_NOPTS_VALUE
;
/* we set the current DTS to an unspecified origin */
st
->
cur_dts
=
AV_NOPTS_VALUE
;
/* we set the current DTS to an unspecified origin */
st
->
reference_dts
=
AV_NOPTS_VALUE
;
st
->
probe_packets
=
MAX_PROBE_PACKETS
;
st
->
probe_packets
=
MAX_PROBE_PACKETS
;
...
@@ -1868,7 +1848,6 @@ static void estimate_timings_from_pts(AVFormatContext *ic, int64_t old_offset)
...
@@ -1868,7 +1848,6 @@ static void estimate_timings_from_pts(AVFormatContext *ic, int64_t old_offset)
st
=
ic
->
streams
[
i
];
st
=
ic
->
streams
[
i
];
st
->
cur_dts
=
st
->
first_dts
;
st
->
cur_dts
=
st
->
first_dts
;
st
->
last_IP_pts
=
AV_NOPTS_VALUE
;
st
->
last_IP_pts
=
AV_NOPTS_VALUE
;
st
->
reference_dts
=
AV_NOPTS_VALUE
;
}
}
}
}
...
@@ -2618,7 +2597,6 @@ AVStream *avformat_new_stream(AVFormatContext *s, AVCodec *c)
...
@@ -2618,7 +2597,6 @@ AVStream *avformat_new_stream(AVFormatContext *s, AVCodec *c)
st
->
last_IP_pts
=
AV_NOPTS_VALUE
;
st
->
last_IP_pts
=
AV_NOPTS_VALUE
;
for
(
i
=
0
;
i
<
MAX_REORDER_DELAY
+
1
;
i
++
)
for
(
i
=
0
;
i
<
MAX_REORDER_DELAY
+
1
;
i
++
)
st
->
pts_buffer
[
i
]
=
AV_NOPTS_VALUE
;
st
->
pts_buffer
[
i
]
=
AV_NOPTS_VALUE
;
st
->
reference_dts
=
AV_NOPTS_VALUE
;
st
->
sample_aspect_ratio
=
(
AVRational
){
0
,
1
};
st
->
sample_aspect_ratio
=
(
AVRational
){
0
,
1
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录