Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
e99743da
Commit
e99743da
authored
Sep 17, 2013
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xiph: handle mixed case comments.
Lowercase or mixed case identifier are legit. reverts
03c69b44
parent
d8295d11
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
9 deletions
+12
-9
modules/demux/xiph_metadata.c
modules/demux/xiph_metadata.c
+12
-9
No files found.
modules/demux/xiph_metadata.c
View file @
e99743da
...
...
@@ -299,7 +299,7 @@ void vorbis_ParseComment( vlc_meta_t **pp_meta,
char
*
p
=
strchr
(
psz_comment
,
'='
);
char
*
psz_val
;
if
(
!
p
)
continue
;
if
(
!
strncmp
(
psz_comment
,
"REPLAYGAIN_TRACK_GAIN="
,
22
)
)
if
(
!
strnc
asec
mp
(
psz_comment
,
"REPLAYGAIN_TRACK_GAIN="
,
22
)
)
{
psz_val
=
malloc
(
strlen
(
p
+
1
)
+
1
);
if
(
!
psz_val
)
continue
;
...
...
@@ -309,7 +309,7 @@ void vorbis_ParseComment( vlc_meta_t **pp_meta,
free
(
psz_val
);
}
}
else
if
(
!
strncmp
(
psz_comment
,
"REPLAYGAIN_ALBUM_GAIN="
,
22
)
)
else
if
(
!
strnc
asec
mp
(
psz_comment
,
"REPLAYGAIN_ALBUM_GAIN="
,
22
)
)
{
psz_val
=
malloc
(
strlen
(
p
+
1
)
+
1
);
if
(
!
psz_val
)
continue
;
...
...
@@ -319,11 +319,11 @@ void vorbis_ParseComment( vlc_meta_t **pp_meta,
free
(
psz_val
);
}
}
else
if
(
!
strncmp
(
psz_comment
,
"REPLAYGAIN_ALBUM_PEAK="
,
22
)
)
else
if
(
!
strnc
asec
mp
(
psz_comment
,
"REPLAYGAIN_ALBUM_PEAK="
,
22
)
)
{
(
*
ppf_replay_peak
)[
AUDIO_REPLAY_GAIN_ALBUM
]
=
us_atof
(
++
p
);
}
else
if
(
!
strncmp
(
psz_comment
,
"REPLAYGAIN_TRACK_PEAK="
,
22
)
)
else
if
(
!
strnc
asec
mp
(
psz_comment
,
"REPLAYGAIN_TRACK_PEAK="
,
22
)
)
{
(
*
ppf_replay_peak
)[
AUDIO_REPLAY_GAIN_TRACK
]
=
us_atof
(
++
p
);
}
...
...
@@ -332,9 +332,13 @@ void vorbis_ParseComment( vlc_meta_t **pp_meta,
{
unsigned
int
i_chapt
;
seekpoint_t
*
p_seekpoint
=
NULL
;
if
(
strcasestr
(
psz_comment
,
"NAME="
)
&&
(
sscanf
(
psz_comment
,
"CHAPTER%uNAME="
,
&
i_chapt
)
==
1
||
sscanf
(
psz_comment
,
"chapter%name="
,
&
i_chapt
)
==
1
)
)
for
(
int
i
=
0
;
psz_comment
[
i
]
&&
psz_comment
[
i
]
!=
'='
;
i
++
)
if
(
psz_comment
[
i
]
>=
'a'
&&
psz_comment
[
i
]
<=
'z'
)
psz_comment
[
i
]
-=
'a'
-
'A'
;
if
(
strstr
(
psz_comment
,
"NAME="
)
&&
sscanf
(
psz_comment
,
"CHAPTER%uNAME="
,
&
i_chapt
)
==
1
)
{
char
*
p
=
strchr
(
psz_comment
,
'='
);
p_seekpoint
=
getChapterEntry
(
i_chapt
,
&
chapters_array
);
...
...
@@ -342,8 +346,7 @@ void vorbis_ParseComment( vlc_meta_t **pp_meta,
if
(
!
p_seekpoint
->
psz_name
)
p_seekpoint
->
psz_name
=
strdup
(
++
p
);
}
else
if
(
sscanf
(
psz_comment
,
"CHAPTER%u="
,
&
i_chapt
)
==
1
||
sscanf
(
psz_comment
,
"chapter%u="
,
&
i_chapt
)
==
1
)
else
if
(
sscanf
(
psz_comment
,
"CHAPTER%u="
,
&
i_chapt
)
==
1
)
{
unsigned
int
h
,
m
,
s
,
ms
;
char
*
p
=
strchr
(
psz_comment
,
'='
);
...
...
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