Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
4eb49fdd
Commit
4eb49fdd
authored
Oct 27, 2013
by
Anton Khirnov
Committed by
Michael Niedermayer
Oct 29, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavf: remove unreliable timestamp guessing heuristic
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
e166b82d
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
28 deletions
+0
-28
seek.c
libavformat/seek.c
+0
-3
seek.h
libavformat/seek.h
+0
-1
utils.c
libavformat/utils.c
+0
-24
No files found.
libavformat/seek.c
View file @
4eb49fdd
...
...
@@ -428,13 +428,11 @@ AVParserState *ff_store_parser_state(AVFormatContext *s)
ss
->
parser
=
st
->
parser
;
ss
->
last_IP_pts
=
st
->
last_IP_pts
;
ss
->
cur_dts
=
st
->
cur_dts
;
ss
->
reference_dts
=
st
->
reference_dts
;
ss
->
probe_packets
=
st
->
probe_packets
;
st
->
parser
=
NULL
;
st
->
last_IP_pts
=
AV_NOPTS_VALUE
;
st
->
cur_dts
=
AV_NOPTS_VALUE
;
st
->
reference_dts
=
AV_NOPTS_VALUE
;
st
->
probe_packets
=
MAX_PROBE_PACKETS
;
}
...
...
@@ -467,7 +465,6 @@ void ff_restore_parser_state(AVFormatContext *s, AVParserState *state)
st
->
parser
=
ss
->
parser
;
st
->
last_IP_pts
=
ss
->
last_IP_pts
;
st
->
cur_dts
=
ss
->
cur_dts
;
st
->
reference_dts
=
ss
->
reference_dts
;
st
->
probe_packets
=
ss
->
probe_packets
;
}
...
...
libavformat/seek.h
View file @
4eb49fdd
...
...
@@ -33,7 +33,6 @@ typedef struct AVParserStreamState {
AVCodecParserContext
*
parser
;
int64_t
last_IP_pts
;
int64_t
cur_dts
;
int64_t
reference_dts
;
int
probe_packets
;
}
AVParserStreamState
;
...
...
libavformat/utils.c
View file @
4eb49fdd
...
...
@@ -1091,27 +1091,6 @@ static void compute_pkt_fields(AVFormatContext *s, AVStream *st,
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
;
}
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
;
}
if
(
st
->
reference_dts
!=
AV_NOPTS_VALUE
&&
pkt
->
pts
==
AV_NOPTS_VALUE
)
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. */
if
(
pkt
->
dts
!=
AV_NOPTS_VALUE
&&
pkt
->
pts
!=
AV_NOPTS_VALUE
&&
pkt
->
pts
>
pkt
->
dts
)
presentation_delayed
=
1
;
...
...
@@ -1581,7 +1560,6 @@ void ff_read_frame_flush(AVFormatContext *s)
st
->
last_IP_pts
=
AV_NOPTS_VALUE
;
if
(
st
->
first_dts
==
AV_NOPTS_VALUE
)
st
->
cur_dts
=
RELATIVE_TS_BASE
;
else
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
;
...
...
@@ -2365,7 +2343,6 @@ static void estimate_timings_from_pts(AVFormatContext *ic, int64_t old_offset)
st
=
ic
->
streams
[
i
];
st
->
cur_dts
=
st
->
first_dts
;
st
->
last_IP_pts
=
AV_NOPTS_VALUE
;
st
->
reference_dts
=
AV_NOPTS_VALUE
;
}
}
...
...
@@ -3388,7 +3365,6 @@ AVStream *avformat_new_stream(AVFormatContext *s, const AVCodec *c)
st
->
last_IP_pts
=
AV_NOPTS_VALUE
;
for
(
i
=
0
;
i
<
MAX_REORDER_DELAY
+
1
;
i
++
)
st
->
pts_buffer
[
i
]
=
AV_NOPTS_VALUE
;
st
->
reference_dts
=
AV_NOPTS_VALUE
;
st
->
sample_aspect_ratio
=
(
AVRational
){
0
,
1
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment