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
37330396
Commit
37330396
authored
Mar 02, 2017
by
Carl Eugen Hoyos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavf/flacdec: Return maximum score if the streaminfo header is valid.
parent
4bed0663
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
flacdec.c
libavformat/flacdec.c
+8
-1
No files found.
libavformat/flacdec.c
View file @
37330396
...
...
@@ -233,7 +233,14 @@ static int flac_probe(AVProbeData *p)
return
raw_flac_probe
(
p
);
if
(
p
->
buf_size
<
4
||
memcmp
(
p
->
buf
,
"fLaC"
,
4
))
return
0
;
return
AVPROBE_SCORE_EXTENSION
;
if
(
p
->
buf
[
4
]
&
0x7f
!=
FLAC_METADATA_TYPE_STREAMINFO
||
AV_RB24
(
p
->
buf
+
5
)
!=
FLAC_STREAMINFO_SIZE
||
AV_RB16
(
p
->
buf
+
8
)
<
16
||
AV_RB16
(
p
->
buf
+
8
)
>
AV_RB16
(
p
->
buf
+
10
)
||
!
(
AV_RB24
(
p
->
buf
+
18
)
>>
4
)
||
AV_RB24
(
p
->
buf
+
18
)
>>
4
>
655350
)
return
AVPROBE_SCORE_EXTENSION
;
return
AVPROBE_SCORE_MAX
;
}
static
av_unused
int64_t
flac_read_timestamp
(
AVFormatContext
*
s
,
int
stream_index
,
...
...
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