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
18752844
Commit
18752844
authored
May 06, 2011
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avidec: correct frame_offset for seeking
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
cde55897
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
1 deletion
+17
-1
avidec.c
libavformat/avidec.c
+17
-1
No files found.
libavformat/avidec.c
View file @
18752844
...
...
@@ -1303,7 +1303,7 @@ static int avi_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp
{
AVIContext
*
avi
=
s
->
priv_data
;
AVStream
*
st
;
int
i
,
index
;
int
i
,
index
,
j
;
int64_t
pos
,
pos_min
;
AVIStream
*
ast
;
...
...
@@ -1367,6 +1367,22 @@ static int avi_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp
index
=
0
;
ast2
->
seek_pos
=
st2
->
index_entries
[
index
].
pos
;
pos_min
=
FFMIN
(
pos_min
,
ast2
->
seek_pos
);
}
for
(
i
=
0
;
i
<
s
->
nb_streams
;
i
++
)
{
AVStream
*
st2
=
s
->
streams
[
i
];
AVIStream
*
ast2
=
st2
->
priv_data
;
if
(
ast2
->
sub_ctx
||
st2
->
nb_index_entries
<=
0
)
continue
;
index
=
av_index_search_timestamp
(
st2
,
av_rescale_q
(
timestamp
,
st
->
time_base
,
st2
->
time_base
)
*
FFMAX
(
ast2
->
sample_size
,
1
),
flags
|
AVSEEK_FLAG_BACKWARD
);
if
(
index
<
0
)
index
=
0
;
while
(
index
>
0
&&
st2
->
index_entries
[
index
-
1
].
pos
>=
pos_min
)
index
--
;
ast2
->
frame_offset
=
st2
->
index_entries
[
index
].
timestamp
;
}
...
...
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