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
a602556e
Commit
a602556e
authored
Jan 14, 2004
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
unused
Originally committed as revision 2703 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
82b9e4a2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
15 deletions
+4
-15
asf.c
libavformat/asf.c
+4
-15
No files found.
libavformat/asf.c
View file @
a602556e
...
...
@@ -1378,27 +1378,13 @@ static int64_t asf_read_pts(AVFormatContext *s, int64_t *ppos, int stream_index)
static
int
asf_read_seek
(
AVFormatContext
*
s
,
int
stream_index
,
int64_t
pts
)
{
ASFContext
*
asf
=
s
->
priv_data
;
AVStream
*
st
;
AVPacket
pkt1
,
*
pkt
;
int
block_align
;
int64_t
pos
;
int64_t
pos_min
,
pos_max
,
pts_min
,
pts_max
,
cur_pts
,
pos_limit
;
pkt
=
&
pkt1
;
// Validate pts
if
(
pts
<
0
)
pts
=
0
;
if
(
stream_index
==
-
1
)
stream_index
=
av_find_default_stream_index
(
s
);
st
=
s
->
streams
[
stream_index
];
// ASF files have fixed block sizes, store this to determine offset
block_align
=
asf
->
packet_size
;
if
(
block_align
<=
0
)
if
(
asf
->
packet_size
<=
0
)
return
-
1
;
pos_min
=
0
;
...
...
@@ -1413,6 +1399,9 @@ static int asf_read_seek(AVFormatContext *s, int stream_index, int64_t pts)
int64_t
start_pos
;
assert
(
pos_limit
<=
pos_max
);
assert
(
pos_limit
%
asf
->
packet_size
==
0
);
assert
(
pos_max
%
asf
->
packet_size
==
0
);
assert
(
pos_min
%
asf
->
packet_size
==
0
);
// interpolate position (better than dichotomy)
pos
=
(
int64_t
)((
double
)(
pos_limit
-
pos_min
)
*
...
...
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