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
c4e02d34
Commit
c4e02d34
authored
Oct 18, 2011
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avidec: Dont switch to NI mode if there is no index.
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
39f6733f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
avidec.c
libavformat/avidec.c
+5
-4
No files found.
libavformat/avidec.c
View file @
c4e02d34
...
@@ -236,7 +236,7 @@ static int read_braindead_odml_indx(AVFormatContext *s, int frame_num){
...
@@ -236,7 +236,7 @@ static int read_braindead_odml_indx(AVFormatContext *s, int frame_num){
}
}
}
}
avi
->
index_loaded
=
1
;
avi
->
index_loaded
=
2
;
return
0
;
return
0
;
}
}
...
@@ -756,7 +756,7 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap)
...
@@ -756,7 +756,7 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap)
if
(
!
avi
->
index_loaded
&&
pb
->
seekable
)
if
(
!
avi
->
index_loaded
&&
pb
->
seekable
)
avi_load_index
(
s
);
avi_load_index
(
s
);
avi
->
index_loaded
=
1
;
avi
->
index_loaded
|
=
1
;
avi
->
non_interleaved
|=
guess_ni_flag
(
s
)
|
(
s
->
flags
&
AVFMT_FLAG_SORT_DTS
);
avi
->
non_interleaved
|=
guess_ni_flag
(
s
)
|
(
s
->
flags
&
AVFMT_FLAG_SORT_DTS
);
for
(
i
=
0
;
i
<
s
->
nb_streams
;
i
++
){
for
(
i
=
0
;
i
<
s
->
nb_streams
;
i
++
){
AVStream
*
st
=
s
->
streams
[
i
];
AVStream
*
st
=
s
->
streams
[
i
];
...
@@ -1181,7 +1181,7 @@ resync:
...
@@ -1181,7 +1181,7 @@ resync:
}
}
ast
->
seek_pos
=
0
;
ast
->
seek_pos
=
0
;
if
(
!
avi
->
non_interleaved
&&
st
->
nb_index_entries
>
1
){
if
(
!
avi
->
non_interleaved
&&
st
->
nb_index_entries
>
1
&&
avi
->
index_loaded
>
1
){
int64_t
dts
=
av_rescale_q
(
pkt
->
dts
,
st
->
time_base
,
AV_TIME_BASE_Q
);
int64_t
dts
=
av_rescale_q
(
pkt
->
dts
,
st
->
time_base
,
AV_TIME_BASE_Q
);
if
(
avi
->
dts_max
-
dts
>
2
*
AV_TIME_BASE
){
if
(
avi
->
dts_max
-
dts
>
2
*
AV_TIME_BASE
){
...
@@ -1317,6 +1317,7 @@ static int avi_load_index(AVFormatContext *s)
...
@@ -1317,6 +1317,7 @@ static int avi_load_index(AVFormatContext *s)
if
(
tag
==
MKTAG
(
'i'
,
'd'
,
'x'
,
'1'
)
&&
if
(
tag
==
MKTAG
(
'i'
,
'd'
,
'x'
,
'1'
)
&&
avi_read_idx1
(
s
,
size
)
>=
0
)
{
avi_read_idx1
(
s
,
size
)
>=
0
)
{
avi
->
index_loaded
=
2
;
ret
=
0
;
ret
=
0
;
break
;
break
;
}
}
...
@@ -1351,7 +1352,7 @@ static int avi_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp
...
@@ -1351,7 +1352,7 @@ static int avi_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp
if
(
!
avi
->
index_loaded
)
{
if
(
!
avi
->
index_loaded
)
{
/* we only load the index on demand */
/* we only load the index on demand */
avi_load_index
(
s
);
avi_load_index
(
s
);
avi
->
index_loaded
=
1
;
avi
->
index_loaded
|
=
1
;
}
}
assert
(
stream_index
>=
0
);
assert
(
stream_index
>=
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