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
0b051094
Commit
0b051094
authored
May 20, 2004
by
Warren Dukes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more bug fixes
git-svn-id:
https://svn.musicpd.org/mpd/trunk@1108
09075e82-0dd4-0310-85a5-a0d7c8717e4f
parent
05889aa3
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
11 deletions
+21
-11
decode.c
src/decode.c
+11
-9
inputStream_http.c
src/inputStream_http.c
+2
-2
mp3_decode.c
src/mp3_decode.c
+4
-0
ogg_decode.c
src/ogg_decode.c
+4
-0
No files found.
src/decode.c
View file @
0b051094
...
...
@@ -251,6 +251,8 @@ int decodeSeek(PlayerControl * pc, DecoderControl * dc, OutputBuffer * cb,
void
decodeStart
(
PlayerControl
*
pc
,
OutputBuffer
*
cb
,
DecoderControl
*
dc
)
{
int
ret
;
InputStream
inStream
;
int
suffix
=
pc
->
fileSuffix
;
int
decodeType
=
pc
->
decodeType
;
strncpy
(
dc
->
file
,
pc
->
file
,
MAXPATHLEN
);
dc
->
file
[
MAXPATHLEN
]
=
'\0'
;
...
...
@@ -275,10 +277,10 @@ void decodeStart(PlayerControl * pc, OutputBuffer * cb, DecoderControl * dc) {
return
;
}
switch
(
pc
->
decodeType
)
{
switch
(
decodeType
)
{
case
DECODE_TYPE_URL
:
#ifdef HAVE_OGG
if
(
pc
->
fileS
uffix
==
DECODE_SUFFIX_OGG
||
(
inStream
.
mime
&&
if
(
s
uffix
==
DECODE_SUFFIX_OGG
||
(
inStream
.
mime
&&
0
==
strcmp
(
inStream
.
mime
,
"application/ogg"
)))
{
ret
=
ogg_decode
(
cb
,
dc
,
&
inStream
);
...
...
@@ -286,7 +288,7 @@ void decodeStart(PlayerControl * pc, OutputBuffer * cb, DecoderControl * dc) {
}
#endif
#ifdef HAVE_MAD
/*if(
pc->
fileSuffix == DECODE_SUFFIX_MP3 || (inStream.mime &&
/*if(fileSuffix == DECODE_SUFFIX_MP3 || (inStream.mime &&
0 == strcmp(inStream.mime, "audio/mpeg")))*/
{
ret
=
mp3_decode
(
cb
,
dc
,
&
inStream
);
...
...
@@ -296,38 +298,38 @@ void decodeStart(PlayerControl * pc, OutputBuffer * cb, DecoderControl * dc) {
#endif
case
DECODE_TYPE_FILE
:
#ifdef HAVE_MAD
if
(
pc
->
fileS
uffix
==
DECODE_SUFFIX_MP3
)
{
if
(
s
uffix
==
DECODE_SUFFIX_MP3
)
{
ret
=
mp3_decode
(
cb
,
dc
,
&
inStream
);
break
;
}
#endif
#ifdef HAVE_OGG
if
(
pc
->
fileS
uffix
==
DECODE_SUFFIX_OGG
)
{
if
(
s
uffix
==
DECODE_SUFFIX_OGG
)
{
ret
=
ogg_decode
(
cb
,
dc
,
&
inStream
);
break
;
}
#endif
#ifdef HAVE_FAAD
if
(
pc
->
fileS
uffix
==
DECODE_SUFFIX_AAC
)
{
if
(
s
uffix
==
DECODE_SUFFIX_AAC
)
{
closeInputStream
(
&
inStream
);
ret
=
aac_decode
(
cb
,
dc
);
break
;
}
if
(
pc
->
fileS
uffix
==
DECODE_SUFFIX_MP4
)
{
if
(
s
uffix
==
DECODE_SUFFIX_MP4
)
{
closeInputStream
(
&
inStream
);
ret
=
mp4_decode
(
cb
,
dc
);
break
;
}
#endif
#ifdef HAVE_FLAC
if
(
pc
->
fileS
uffix
==
DECODE_SUFFIX_FLAC
)
{
if
(
s
uffix
==
DECODE_SUFFIX_FLAC
)
{
closeInputStream
(
&
inStream
);
ret
=
flac_decode
(
cb
,
dc
);
break
;
}
#endif
#ifdef HAVE_AUDIOFILE
if
(
pc
->
fileS
uffix
==
DECODE_SUFFIX_WAVE
)
{
if
(
s
uffix
==
DECODE_SUFFIX_WAVE
)
{
closeInputStream
(
&
inStream
);
ret
=
audiofile_decode
(
cb
,
dc
);
break
;
...
...
src/inputStream_http.c
View file @
0b051094
...
...
@@ -39,7 +39,7 @@
#define HTTP_CONN_STATE_OPEN 3
#define HTTP_CONN_STATE_REOPEN 4
#define HTTP_BUFFER_SIZE
524289
#define HTTP_BUFFER_SIZE
131072
#define HTTP_PREBUFFER_SIZE (HTTP_BUFFER_SIZE >> 2)
//#define HTTP_PREBUFFER_SIZE 0
...
...
@@ -406,7 +406,7 @@ static int getHTTPHello(InputStream * inStream) {
data
->
connState
=
HTTP_CONN_STATE_OPEN
;
/*data->prebuffer = 1;*/
data
->
prebuffer
=
1
;
/*mark as unseekable till we actually implement seeking*/
inStream
->
seekable
=
0
;
...
...
src/mp3_decode.c
View file @
0b051094
...
...
@@ -567,6 +567,10 @@ int mp3_decode(OutputBuffer * cb, DecoderControl * dc, InputStream * inStream) {
ERROR
(
"Input does not appear to be a mp3 bit stream.
\n
"
);
return
-
1
;
}
else
{
dc
->
state
=
DECODE_STATE_STOP
;
dc
->
stop
=
0
;
}
return
0
;
}
...
...
src/ogg_decode.c
View file @
0b051094
...
...
@@ -183,6 +183,10 @@ int ogg_decode(OutputBuffer * cb, DecoderControl * dc, InputStream * inStream)
ERROR
(
"Input does not appear to be an Ogg Vorbis stream.
\n
"
);
return
-
1
;
}
else
{
dc
->
state
=
DECODE_STATE_STOP
;
dc
->
stop
=
0
;
}
return
0
;
}
...
...
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