Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
f45bf037
Commit
f45bf037
authored
Nov 17, 2011
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Dash: Simplify Dash detection
It should be faster and matches better the other stream filters
parent
e202b76c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
12 deletions
+5
-12
modules/stream_filter/dash/xml/DOMParser.cpp
modules/stream_filter/dash/xml/DOMParser.cpp
+5
-12
No files found.
modules/stream_filter/dash/xml/DOMParser.cpp
View file @
f45bf037
...
...
@@ -141,20 +141,13 @@ Profile DOMParser::getProfile (dash::xml::Node *node)
}
bool
DOMParser
::
isDash
(
stream_t
*
stream
)
{
const
uint8_t
*
peek
,
*
peek_end
;
const
uint8_t
*
peek
;
int64_t
i_size
=
stream_Peek
(
stream
,
&
peek
,
2048
)
;
if
(
i_size
<
1
)
const
char
*
psz_namespace
=
"urn:mpeg:mpegB:schema:DASH:MPD:DIS2011"
;
if
(
stream_Peek
(
stream
,
&
peek
,
1024
)
<
(
int
)
strlen
(
psz_namespace
)
)
return
false
;
peek_end
=
peek
+
i_size
;
while
(
peek
<=
peek_end
)
{
const
char
*
p
=
strstr
((
const
char
*
)
peek
,
"urn:mpeg:mpegB:schema:DASH:MPD:DIS2011"
);
if
(
p
!=
NULL
)
return
true
;
peek
++
;
};
const
char
*
p
=
strstr
((
const
char
*
)
peek
,
psz_namespace
);
return
false
;
return
p
!=
NULL
;
}
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