Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Xiph.Org
Icecast-Server
Commits
a2180551
Commit
a2180551
authored
Feb 19, 2016
by
Joseph Wallace
Browse files
Move tag-parsing bail conditions to top for clarity.
parent
78293f04
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/format_ebml.c
View file @
a2180551
...
...
@@ -630,12 +630,19 @@ static ssize_t ebml_wrote(ebml_t *ebml, size_t len)
tag_length
=
ebml_parse_tag
(
ebml
->
input_buffer
+
cursor
,
end_of_buffer
,
&
payload_length
);
if
(
tag_length
>
0
)
{
if
(
tag_length
==
0
)
{
/* Wait for more data */
processing
=
false
;
break
;
}
else
if
(
tag_length
<
0
)
{
/* Parse error */
return
-
1
;
}
if
(
payload_length
==
EBML_UNKNOWN
)
{
/* Parse all children for tags we can't skip */
payload_length
=
0
;
}
if
(
payload_length
==
EBML_UNKNOWN
)
{
/* Parse all children for tags we can't skip */
payload_length
=
0
;
}
/* Recognize tags of interest */
if
(
tag_length
>
UNCOMMON_MAGIC_LEN
)
{
...
...
@@ -739,13 +746,6 @@ static ssize_t ebml_wrote(ebml_t *ebml, size_t len)
ebml
->
parse_state
=
copy_state
;
}
}
else
if
(
tag_length
==
0
)
{
/* Wait for more data */
processing
=
false
;
}
else
if
(
tag_length
<
0
)
{
/* Parse error */
return
-
1
;
}
break
;
case
EBML_STATE_START_CLUSTER
:
...
...
Write
Preview
Supports
Markdown
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