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
46eaaad8
Commit
46eaaad8
authored
Aug 03, 2011
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Detect NI-avi at playtime like mplayer.
Fixes Ticket333 Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
652c7729
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
avidec.c
libavformat/avidec.c
+12
-0
No files found.
libavformat/avidec.c
View file @
46eaaad8
...
...
@@ -73,6 +73,7 @@ typedef struct {
int
odml_depth
;
int
use_odml
;
#define MAX_ODML_DEPTH 1000
int64_t
dts_max
;
}
AVIContext
;
...
...
@@ -1168,6 +1169,16 @@ resync:
}
ast
->
seek_pos
=
0
;
if
(
!
avi
->
non_interleaved
&&
st
->
nb_index_entries
>
1
){
int64_t
dts
=
av_rescale_q
(
pkt
->
dts
,
st
->
time_base
,
AV_TIME_BASE_Q
);
if
(
avi
->
dts_max
-
dts
>
2
*
AV_TIME_BASE
){
avi
->
non_interleaved
=
1
;
av_log
(
s
,
AV_LOG_INFO
,
"Switching to NI mode, due to poor interleaving
\n
"
);
}
else
if
(
avi
->
dts_max
<
dts
)
avi
->
dts_max
=
dts
;
}
return
size
;
}
...
...
@@ -1407,6 +1418,7 @@ static int avi_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp
/* do the seek */
avio_seek
(
s
->
pb
,
pos_min
,
SEEK_SET
);
avi
->
stream_index
=
-
1
;
avi
->
dts_max
=
INT_MIN
;
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