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
82743dfd
Commit
82743dfd
authored
Mar 12, 2020
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
playlist/asx: concatenate multiple CharacterData fragments
Similar to
c45f1138
parent
33694642
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
3 deletions
+11
-3
NEWS
NEWS
+1
-1
AsxPlaylistPlugin.cxx
src/playlist/plugins/AsxPlaylistPlugin.cxx
+10
-2
No files found.
NEWS
View file @
82743dfd
...
@@ -2,7 +2,7 @@ ver 0.21.21 (not yet released)
...
@@ -2,7 +2,7 @@ ver 0.21.21 (not yet released)
* configuration
* configuration
- fix bug in "metadata_to_use" setting
- fix bug in "metadata_to_use" setting
* playlist
* playlist
- xspf: fix corrupt tags in the presence of XML entities
-
asx,
xspf: fix corrupt tags in the presence of XML entities
* archive
* archive
- iso9660: skip empty file names to work around libcdio bug
- iso9660: skip empty file names to work around libcdio bug
* decoder
* decoder
...
...
src/playlist/plugins/AsxPlaylistPlugin.cxx
View file @
82743dfd
...
@@ -59,6 +59,8 @@ struct AsxParser {
...
@@ -59,6 +59,8 @@ struct AsxParser {
TagBuilder
tag_builder
;
TagBuilder
tag_builder
;
std
::
string
value
;
AsxParser
()
AsxParser
()
:
state
(
ROOT
)
{}
:
state
(
ROOT
)
{}
...
@@ -77,6 +79,7 @@ asx_start_element(void *user_data, const XML_Char *element_name,
...
@@ -77,6 +79,7 @@ asx_start_element(void *user_data, const XML_Char *element_name,
const
XML_Char
**
atts
)
const
XML_Char
**
atts
)
{
{
AsxParser
*
parser
=
(
AsxParser
*
)
user_data
;
AsxParser
*
parser
=
(
AsxParser
*
)
user_data
;
parser
->
value
.
clear
();
switch
(
parser
->
state
)
{
switch
(
parser
->
state
)
{
case
AsxParser
:
:
ROOT
:
case
AsxParser
:
:
ROOT
:
...
@@ -128,9 +131,15 @@ asx_end_element(void *user_data, const XML_Char *element_name)
...
@@ -128,9 +131,15 @@ asx_end_element(void *user_data, const XML_Char *element_name)
break
;
break
;
case
AsxParser
:
:
TAG
:
case
AsxParser
:
:
TAG
:
if
(
!
parser
->
value
.
empty
())
parser
->
tag_builder
.
AddItem
(
parser
->
tag_type
,
StringView
(
parser
->
value
.
data
(),
parser
->
value
.
length
()));
parser
->
state
=
AsxParser
::
ENTRY
;
parser
->
state
=
AsxParser
::
ENTRY
;
break
;
break
;
}
}
parser
->
value
.
clear
();
}
}
static
void
XMLCALL
static
void
XMLCALL
...
@@ -144,8 +153,7 @@ asx_char_data(void *user_data, const XML_Char *s, int len)
...
@@ -144,8 +153,7 @@ asx_char_data(void *user_data, const XML_Char *s, int len)
break
;
break
;
case
AsxParser
:
:
TAG
:
case
AsxParser
:
:
TAG
:
parser
->
tag_builder
.
AddItem
(
parser
->
tag_type
,
parser
->
value
.
append
(
s
,
len
);
StringView
(
s
,
len
));
break
;
break
;
}
}
}
}
...
...
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