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
df251a99
Commit
df251a99
authored
Aug 26, 2008
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
assert song->url != NULL
parent
e9933316
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
0 deletions
+10
-0
player.c
src/player.c
+3
-0
player_thread.c
src/player_thread.c
+4
-0
song.c
src/song.c
+3
-0
No files found.
src/player.c
View file @
df251a99
...
...
@@ -39,6 +39,9 @@ int playerWait(int fd)
static
void
set_current_song
(
Song
*
song
)
{
assert
(
song
!=
NULL
);
assert
(
song
->
url
!=
NULL
);
pc
.
fileTime
=
song
->
tag
?
song
->
tag
->
time
:
0
;
pc
.
next_song
=
song
;
}
...
...
src/player_thread.c
View file @
df251a99
...
...
@@ -69,6 +69,7 @@ static int waitOnDecode(int *decodeWaitedOn)
}
if
(
dc
.
error
!=
DECODE_ERROR_NOERROR
)
{
assert
(
dc
.
next_song
==
NULL
||
dc
.
next_song
->
url
!=
NULL
);
pc
.
errored_song
=
dc
.
next_song
;
pc
.
error
=
PLAYER_ERROR_FILE
;
return
-
1
;
...
...
@@ -148,6 +149,7 @@ static void processDecodeInput(int *pause_r, unsigned int *bbp_r,
pc
.
state
=
PLAYER_STATE_PLAY
;
}
else
{
char
tmp
[
MPD_PATH_MAX
];
assert
(
dc
.
next_song
==
NULL
||
dc
.
next_song
->
url
!=
NULL
);
pc
.
errored_song
=
dc
.
next_song
;
pc
.
error
=
PLAYER_ERROR_AUDIO
;
ERROR
(
"problems opening audio device "
...
...
@@ -246,6 +248,7 @@ static void decodeParent(void)
decodeWaitedOn
=
0
;
if
(
openAudioDevice
(
&
(
ob
.
audioFormat
))
<
0
)
{
char
tmp
[
MPD_PATH_MAX
];
assert
(
dc
.
next_song
==
NULL
||
dc
.
next_song
->
url
!=
NULL
);
pc
.
errored_song
=
dc
.
next_song
;
pc
.
error
=
PLAYER_ERROR_AUDIO
;
ERROR
(
"problems opening audio device "
...
...
@@ -266,6 +269,7 @@ static void decodeParent(void)
}
else
if
(
dc
.
state
!=
DECODE_STATE_START
)
{
/* the decoder failed */
assert
(
dc
.
next_song
==
NULL
||
dc
.
next_song
->
url
!=
NULL
);
pc
.
errored_song
=
dc
.
next_song
;
pc
.
error
=
PLAYER_ERROR_FILE
;
break
;
...
...
src/song.c
View file @
df251a99
...
...
@@ -316,6 +316,9 @@ char *get_song_url(char *path_max_tmp, Song *song)
{
if
(
!
song
)
return
NULL
;
assert
(
song
->
url
!=
NULL
);
if
(
!
song
->
parentDir
||
!
song
->
parentDir
->
path
)
strcpy
(
path_max_tmp
,
song
->
url
);
else
...
...
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