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
b10beb9c
Commit
b10beb9c
authored
Sep 02, 2015
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cdda: simplify using access_t.psz_url
parent
80bc1fe2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
9 deletions
+7
-9
modules/access/cdda.c
modules/access/cdda.c
+7
-9
No files found.
modules/access/cdda.c
View file @
b10beb9c
...
...
@@ -472,26 +472,24 @@ static int GetTracks( access_t *p_access, input_item_t *p_current )
/* Build title table */
for
(
int
i
=
0
;
i
<
i_titles
;
i
++
)
{
char
*
psz_
uri
,
*
psz_
opt
,
*
psz_name
;
char
*
psz_opt
,
*
psz_name
;
msg_Dbg
(
p_access
,
"track[%d] start=%d"
,
i
,
p_sys
->
p_sectors
[
i
]
);
if
(
asprintf
(
&
psz_uri
,
"cdda://%s"
,
p_access
->
psz_location
)
==
-
1
)
continue
;
/* Define a "default name" */
if
(
asprintf
(
&
psz_name
,
_
(
"Audio CD - Track %02i"
),
(
i
+
1
)
)
==
-
1
)
psz_name
=
p
sz_uri
;
psz_name
=
p
_access
->
psz_url
;
/* Create playlist items */
const
mtime_t
i_duration
=
(
int64_t
)(
p_sys
->
p_sectors
[
i
+
1
]
-
p_sys
->
p_sectors
[
i
]
)
*
CDDA_DATA_SIZE
*
1000000
/
44100
/
2
/
2
;
input_item_t
*
p_item
=
input_item_NewWithType
(
psz_uri
,
psz_name
,
0
,
NULL
,
0
,
i_duration
,
ITEM_TYPE_DISC
);
if
(
likely
(
psz_name
!=
psz_uri
)
)
input_item_t
*
p_item
=
input_item_NewWithType
(
p_access
->
psz_url
,
psz_name
,
0
,
NULL
,
0
,
i_duration
,
ITEM_TYPE_DISC
);
if
(
likely
(
psz_name
!=
p_access
->
psz_url
)
)
free
(
psz_name
);
free
(
psz_uri
);
if
(
unlikely
(
p_item
==
NULL
)
)
continue
;
...
...
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