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
15c61f6e
Commit
15c61f6e
authored
Jun 03, 2004
by
Warren Dukes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
don't stop on play command!
git-svn-id:
https://svn.musicpd.org/mpd/trunk@1313
09075e82-0dd4-0310-85a5-a0d7c8717e4f
parent
a29e38be
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
5 deletions
+13
-5
command.c
src/command.c
+1
-1
decode.c
src/decode.c
+4
-2
mp3_plugin.c
src/inputPlugins/mp3_plugin.c
+3
-2
playlist.c
src/playlist.c
+5
-0
No files found.
src/command.c
View file @
15c61f6e
...
...
@@ -155,7 +155,7 @@ int handlePlay(FILE * fp, unsigned int * permission, int argArrayLength,
return
-
1
;
}
}
return
playPlaylist
(
fp
,
song
,
1
);
return
playPlaylist
(
fp
,
song
,
0
);
}
int
handleStop
(
FILE
*
fp
,
unsigned
int
*
permission
,
int
argArrayLength
,
...
...
src/decode.c
View file @
15c61f6e
...
...
@@ -256,7 +256,7 @@ int decodeSeek(PlayerControl * pc, DecoderControl * dc, OutputBuffer * cb,
void
decodeStart
(
PlayerControl
*
pc
,
OutputBuffer
*
cb
,
DecoderControl
*
dc
)
{
int
ret
;
InputStream
inStream
;
InputPlugin
*
plugin
;
InputPlugin
*
plugin
=
NULL
;
char
*
path
;
if
(
isRemoteUrl
(
pc
->
utf8url
))
{
...
...
@@ -311,7 +311,9 @@ void decodeStart(PlayerControl * pc, OutputBuffer * cb, DecoderControl * dc) {
ret
=
DECODE_ERROR_UNKTYPE
;
if
(
isRemoteUrl
(
pc
->
utf8url
))
{
plugin
=
getInputPluginFromMimeType
(
inStream
.
mime
);
if
(
inStream
.
mime
)
{
plugin
=
getInputPluginFromMimeType
(
inStream
.
mime
);
}
if
(
plugin
==
NULL
)
{
plugin
=
getInputPluginFromSuffix
(
getSuffix
(
dc
->
utf8url
));
...
...
src/inputPlugins/mp3_plugin.c
View file @
15c61f6e
...
...
@@ -451,7 +451,6 @@ void mp3DecodeDataFinalize(mp3DecodeData * data) {
mad_frame_finish
(
&
data
->
frame
);
mad_stream_finish
(
&
data
->
stream
);
closeInputStream
(
data
->
inStream
);
if
(
data
->
frameOffset
)
free
(
data
->
frameOffset
);
if
(
data
->
times
)
free
(
data
->
times
);
}
...
...
@@ -468,6 +467,7 @@ int getMp3TotalTime(char * file) {
if
(
decodeFirstFrame
(
&
data
,
NULL
,
NULL
)
<
0
)
ret
=
-
1
;
else
ret
=
data
.
totalTime
+
0
.
5
;
mp3DecodeDataFinalize
(
&
data
);
closeInputStream
(
&
inStream
);
return
ret
;
}
...
...
@@ -626,7 +626,7 @@ int mp3_decode(OutputBuffer * cb, DecoderControl * dc, InputStream * inStream) {
MpdTag
*
tag
;
if
(
openMp3FromInputStream
(
inStream
,
&
data
,
dc
,
&
tag
)
<
0
)
{
closeInputStream
(
inStream
);
closeInputStream
(
inStream
);
if
(
!
dc
->
stop
)
{
ERROR
(
"Input does not appear to be a mp3 bit stream.
\n
"
);
return
-
1
;
...
...
@@ -662,6 +662,7 @@ int mp3_decode(OutputBuffer * cb, DecoderControl * dc, InputStream * inStream) {
flushOutputBuffer
(
cb
);
mp3DecodeDataFinalize
(
&
data
);
closeInputStream
(
inStream
);
/*if(dc->seek) {
dc->seekError = 1;
...
...
src/playlist.c
View file @
15c61f6e
...
...
@@ -825,16 +825,21 @@ void playPlaylistIfPlayerStopped() {
if
(
error
==
PLAYER_ERROR_NOERROR
)
playlist_errorCount
=
0
;
else
playlist_errorCount
++
;
printf
(
"HERE 1
\n
"
);
if
(
playlist_state
==
PLAYLIST_STATE_PLAY
&&
(
(
playlist_stopOnError
&&
error
!=
PLAYER_ERROR_NOERROR
)
||
error
==
PLAYER_ERROR_AUDIO
||
error
==
PLAYER_ERROR_SYSTEM
||
playlist_errorCount
>=
playlist
.
length
))
{
printf
(
"HERE 1-1
\n
"
);
printf
(
"playlist_stopOnError: %i
\n
"
,
playlist_stopOnError
);
stopPlaylist
(
stderr
);
printf
(
"HERE 1-2
\n
"
);
}
else
if
(
playlist_noGoToNext
)
currentSongInPlaylist
(
stderr
);
else
nextSongInPlaylist
(
stderr
);
printf
(
"HERE 2
\n
"
);
}
}
...
...
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