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
84a19e11
Commit
84a19e11
authored
Oct 16, 2015
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Taglib: extract first value only if couple is incomplete
parent
265b0886
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
modules/meta_engine/taglib.cpp
modules/meta_engine/taglib.cpp
+9
-3
No files found.
modules/meta_engine/taglib.cpp
View file @
84a19e11
...
...
@@ -114,18 +114,24 @@ vlc_module_end ()
using
namespace
TagLib
;
static
void
ExtractCoupleNumberValues
(
vlc_meta_t
*
p_meta
,
const
char
*
psz_value
,
static
int
ExtractCoupleNumberValues
(
vlc_meta_t
*
p_meta
,
const
char
*
psz_value
,
vlc_meta_type_t
first
,
vlc_meta_type_t
second
)
{
unsigned
int
i_trknum
,
i_trktot
;
if
(
sscanf
(
psz_value
,
"%u/%u"
,
&
i_trknum
,
&
i_trktot
)
==
2
)
int
i_ret
=
sscanf
(
psz_value
,
"%u/%u"
,
&
i_trknum
,
&
i_trktot
);
char
psz_trck
[
11
];
if
(
i_ret
>=
1
)
{
char
psz_trck
[
11
];
snprintf
(
psz_trck
,
sizeof
(
psz_trck
),
"%u"
,
i_trknum
);
vlc_meta_Set
(
p_meta
,
first
,
psz_trck
);
}
if
(
i_ret
==
2
)
{
snprintf
(
psz_trck
,
sizeof
(
psz_trck
),
"%u"
,
i_trktot
);
vlc_meta_Set
(
p_meta
,
second
,
psz_trck
);
}
return
i_ret
;
}
/**
...
...
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