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
5e24098b
Commit
5e24098b
authored
May 05, 2011
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avidec: detect mpeg4 keyframes in indexless avi
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
0fa8d199
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
avidec.c
libavformat/avidec.c
+17
-0
No files found.
libavformat/avidec.c
View file @
5e24098b
...
...
@@ -1002,6 +1002,23 @@ resync:
e
=
&
st
->
index_entries
[
index
];
if
(
index
>=
0
&&
e
->
timestamp
==
ast
->
frame_offset
){
if
(
index
==
st
->
nb_index_entries
-
1
){
int
key
=
1
;
int
i
;
uint32_t
state
=-
1
;
for
(
i
=
0
;
i
<
FFMIN
(
size
,
256
);
i
++
){
if
(
st
->
codec
->
codec_id
==
CODEC_ID_MPEG4
){
if
(
state
==
0x1B6
){
key
=
!
(
pkt
->
data
[
i
]
&
0xC0
);
break
;
}
}
else
break
;
state
=
(
state
<<
8
)
+
pkt
->
data
[
i
];
}
if
(
!
key
)
e
->
flags
&=
~
AVINDEX_KEYFRAME
;
}
if
(
e
->
flags
&
AVINDEX_KEYFRAME
)
pkt
->
flags
|=
AV_PKT_FLAG_KEY
;
}
...
...
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