Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
0d24250a
Commit
0d24250a
authored
Sep 04, 2012
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
decoder/_ogg_common: simplify the large "if" expression
parent
2050e2f8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
_ogg_common.c
src/decoder/_ogg_common.c
+8
-6
No files found.
src/decoder/_ogg_common.c
View file @
0d24250a
...
...
@@ -33,12 +33,14 @@ ogg_stream_type ogg_stream_type_detect(struct input_stream *inStream)
size_t
r
;
r
=
decoder_read
(
NULL
,
inStream
,
buf
,
sizeof
(
buf
));
if
(
r
>=
32
&&
memcmp
(
buf
,
"OggS"
,
4
)
==
0
&&
(
(
memcmp
(
buf
+
29
,
"FLAC"
,
4
)
==
0
&&
memcmp
(
buf
+
37
,
"fLaC"
,
4
)
==
0
)
||
(
memcmp
(
buf
+
28
,
"FLAC"
,
4
)
==
0
)
||
(
memcmp
(
buf
+
28
,
"fLaC"
,
4
)
==
0
)))
{
if
(
r
<
32
||
memcmp
(
buf
,
"OggS"
,
4
)
!=
0
)
return
VORBIS
;
if
((
memcmp
(
buf
+
29
,
"FLAC"
,
4
)
==
0
&&
memcmp
(
buf
+
37
,
"fLaC"
,
4
)
==
0
)
||
memcmp
(
buf
+
28
,
"FLAC"
,
4
)
==
0
||
memcmp
(
buf
+
28
,
"fLaC"
,
4
)
==
0
)
return
FLAC
;
}
return
VORBIS
;
}
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