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
b8c16558
Commit
b8c16558
authored
Jan 30, 2012
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avidec: print informative error messages if seeking fails.
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
97da38c9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
avidec.c
libavformat/avidec.c
+10
-1
No files found.
libavformat/avidec.c
View file @
b8c16558
...
@@ -1386,7 +1386,14 @@ static int avi_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp
...
@@ -1386,7 +1386,14 @@ static int avi_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp
ast
=
st
->
priv_data
;
ast
=
st
->
priv_data
;
index
=
av_index_search_timestamp
(
st
,
timestamp
*
FFMAX
(
ast
->
sample_size
,
1
),
flags
);
index
=
av_index_search_timestamp
(
st
,
timestamp
*
FFMAX
(
ast
->
sample_size
,
1
),
flags
);
if
(
index
<
0
)
if
(
index
<
0
)
if
(
index
<
0
)
{
if
(
st
->
nb_index_entries
>
0
)
av_log
(
s
,
AV_LOG_ERROR
,
"Failed to find timestamp %"
PRId64
" in index %"
PRId64
" .. %"
PRId64
"
\n
"
,
timestamp
*
FFMAX
(
ast
->
sample_size
,
1
),
st
->
index_entries
[
0
].
timestamp
,
st
->
index_entries
[
st
->
nb_index_entries
-
1
].
timestamp
);
return
-
1
;
return
-
1
;
}
/* find the position */
/* find the position */
pos
=
st
->
index_entries
[
index
].
pos
;
pos
=
st
->
index_entries
[
index
].
pos
;
...
@@ -1457,8 +1464,10 @@ static int avi_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp
...
@@ -1457,8 +1464,10 @@ static int avi_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp
}
}
/* do the seek */
/* do the seek */
if
(
avio_seek
(
s
->
pb
,
pos_min
,
SEEK_SET
)
<
0
)
if
(
avio_seek
(
s
->
pb
,
pos_min
,
SEEK_SET
)
<
0
)
{
av_log
(
s
,
AV_LOG_ERROR
,
"Seek failed
\n
"
);
return
-
1
;
return
-
1
;
}
avi
->
stream_index
=
-
1
;
avi
->
stream_index
=
-
1
;
avi
->
dts_max
=
INT_MIN
;
avi
->
dts_max
=
INT_MIN
;
return
0
;
return
0
;
...
...
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