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
6253e94c
Commit
6253e94c
authored
Aug 22, 2015
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xiph: simplify and fix leak
parent
3b91f529
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
15 deletions
+2
-15
modules/demux/xiph_metadata.c
modules/demux/xiph_metadata.c
+2
-15
No files found.
modules/demux/xiph_metadata.c
View file @
6253e94c
...
...
@@ -306,27 +306,14 @@ void vorbis_ParseComment( es_format_t *p_fmt, vlc_meta_t **pp_meta,
else
if
(
ppf_replay_gain
&&
ppf_replay_peak
&&
!
strncmp
(
psz_comment
,
"REPLAYGAIN_"
,
11
)
)
{
char
*
p
=
strchr
(
psz_comment
,
'='
);
char
*
psz_val
;
if
(
!
p
)
continue
;
if
(
!
strncasecmp
(
psz_comment
,
"REPLAYGAIN_TRACK_GAIN="
,
22
)
)
{
psz_val
=
malloc
(
strlen
(
p
+
1
)
+
1
);
if
(
!
psz_val
)
continue
;
if
(
sscanf
(
++
p
,
"%s dB"
,
psz_val
)
==
1
)
{
(
*
ppf_replay_gain
)[
AUDIO_REPLAY_GAIN_TRACK
]
=
us_atof
(
psz_val
);
free
(
psz_val
);
}
(
*
ppf_replay_gain
)[
AUDIO_REPLAY_GAIN_TRACK
]
=
us_atof
(
++
p
);
}
else
if
(
!
strncasecmp
(
psz_comment
,
"REPLAYGAIN_ALBUM_GAIN="
,
22
)
)
{
psz_val
=
malloc
(
strlen
(
p
+
1
)
+
1
);
if
(
!
psz_val
)
continue
;
if
(
sscanf
(
++
p
,
"%s dB"
,
psz_val
)
==
1
)
{
(
*
ppf_replay_gain
)[
AUDIO_REPLAY_GAIN_ALBUM
]
=
us_atof
(
psz_val
);
free
(
psz_val
);
}
(
*
ppf_replay_gain
)[
AUDIO_REPLAY_GAIN_ALBUM
]
=
us_atof
(
++
p
);
}
else
if
(
!
strncasecmp
(
psz_comment
,
"REPLAYGAIN_ALBUM_PEAK="
,
22
)
)
{
...
...
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