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
aedffc0b
Commit
aedffc0b
authored
Dec 12, 2019
by
James Almer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/mlp_parser: mark sync frames as key frames
Signed-off-by:
James Almer
<
jamrial@gmail.com
>
parent
29f8d4e9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
mlp_parser.c
libavcodec/mlp_parser.c
+6
-0
No files found.
libavcodec/mlp_parser.c
View file @
aedffc0b
...
...
@@ -61,6 +61,8 @@ static int mlp_parse(AVCodecParserContext *s,
int
ret
;
int
i
,
p
=
0
;
s
->
key_frame
=
0
;
*
poutbuf_size
=
0
;
if
(
buf_size
==
0
)
return
0
;
...
...
@@ -136,6 +138,8 @@ static int mlp_parse(AVCodecParserContext *s,
* access unit header and all the 2- or 4-byte substream headers. */
// Only check when this isn't a sync frame - syncs have a checksum.
s
->
key_frame
=
0
;
parity_bits
=
0
;
for
(
i
=
-
1
;
i
<
mp
->
num_substreams
;
i
++
)
{
parity_bits
^=
buf
[
p
++
];
...
...
@@ -159,6 +163,8 @@ static int mlp_parse(AVCodecParserContext *s,
if
(
ff_mlp_read_major_sync
(
avctx
,
&
mh
,
&
gb
)
<
0
)
goto
lost_sync
;
s
->
key_frame
=
1
;
avctx
->
bits_per_raw_sample
=
mh
.
group1_bits
;
if
(
avctx
->
bits_per_raw_sample
>
16
)
avctx
->
sample_fmt
=
AV_SAMPLE_FMT_S32
;
...
...
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