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
71f881d5
Commit
71f881d5
authored
Oct 11, 2009
by
Max Kellermann
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'v0.15.x'
Conflicts: NEWS configure.ac
parents
d4e3fb43
9a3f5ff9
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
60 additions
and
37 deletions
+60
-37
NEWS
NEWS
+8
-0
aiff.c
src/aiff.c
+5
-5
decoder_thread.c
src/decoder_thread.c
+1
-1
curl_input_plugin.c
src/input/curl_input_plugin.c
+41
-26
riff.c
src/riff.c
+5
-5
No files found.
NEWS
View file @
71f881d5
...
...
@@ -43,6 +43,14 @@ ver 0.16 (20??/??/??)
* build with large file support by default
ver 0.15.5 (2009/??/??)
* input:
- curl: don't abort if a packet has only metadata
* tags:
- riff, aiff: fixed "limited range" gcc warning
* decoder_thread: change the fallback decoder name to "mad"
ver 0.15.4 (2009/10/03)
* decoders:
- vorbis: revert "faster tag scanning with ov_test_callback()"
...
...
src/aiff.c
View file @
71f881d5
...
...
@@ -84,6 +84,11 @@ aiff_seek_id3(FILE *file)
return
0
;
size
=
GUINT32_FROM_BE
(
chunk
.
size
);
if
(
size
>
G_MAXINT32
)
/* too dangerous, bail out: possible integer
underflow when casting to off_t */
return
0
;
if
(
size
%
2
!=
0
)
/* pad byte */
++
size
;
...
...
@@ -92,11 +97,6 @@ aiff_seek_id3(FILE *file)
/* found it! */
return
size
;
if
((
off_t
)
size
<
0
)
/* integer underflow after cast to signed
type */
return
0
;
ret
=
fseek
(
file
,
size
,
SEEK_CUR
);
if
(
ret
!=
0
)
return
0
;
...
...
src/decoder_thread.c
View file @
71f881d5
...
...
@@ -189,7 +189,7 @@ static void decoder_run_song(const struct song *song, const char *uri)
if
(
plugin
==
NULL
)
{
/* we already know our mp3Plugin supports streams, no
* need to check for stream{Types,DecodeFunc} */
if
((
plugin
=
decoder_plugin_from_name
(
"m
p3
"
)))
{
if
((
plugin
=
decoder_plugin_from_name
(
"m
ad
"
)))
{
ret
=
decoder_stream_decode
(
plugin
,
&
decoder
,
&
input_stream
);
}
...
...
src/input/curl_input_plugin.c
View file @
71f881d5
...
...
@@ -282,6 +282,42 @@ input_curl_select(struct input_curl *c)
return
ret
;
}
static
bool
fill_buffer
(
struct
input_stream
*
is
)
{
struct
input_curl
*
c
=
is
->
data
;
CURLMcode
mcode
=
CURLM_CALL_MULTI_PERFORM
;
while
(
!
c
->
eof
&&
g_queue_is_empty
(
c
->
buffers
))
{
int
running_handles
;
bool
bret
;
if
(
mcode
!=
CURLM_CALL_MULTI_PERFORM
)
{
/* if we're still here, there is no input yet
- wait for input */
int
ret
=
input_curl_select
(
c
);
if
(
ret
<=
0
)
/* no data yet or error */
return
false
;
}
mcode
=
curl_multi_perform
(
c
->
multi
,
&
running_handles
);
if
(
mcode
!=
CURLM_OK
&&
mcode
!=
CURLM_CALL_MULTI_PERFORM
)
{
g_warning
(
"curl_multi_perform() failed: %s
\n
"
,
curl_multi_strerror
(
mcode
));
c
->
eof
=
true
;
is
->
ready
=
true
;
return
false
;
}
bret
=
input_curl_multi_info_read
(
is
);
if
(
!
bret
)
return
false
;
}
return
true
;
}
/**
* Mark a part of the buffer object as consumed.
*/
...
...
@@ -381,7 +417,7 @@ static size_t
input_curl_read
(
struct
input_stream
*
is
,
void
*
ptr
,
size_t
size
)
{
struct
input_curl
*
c
=
is
->
data
;
CURLMcode
mcode
=
CURLM_CALL_MULTI_PERFORM
;
bool
success
;
GQueue
*
rewind_buffers
;
size_t
nbytes
=
0
;
char
*
dest
=
ptr
;
...
...
@@ -407,34 +443,12 @@ input_curl_read(struct input_stream *is, void *ptr, size_t size)
}
#endif
do
{
/* fill the buffer */
while
(
!
c
->
eof
&&
g_queue_is_empty
(
c
->
buffers
))
{
int
running_handles
;
bool
bret
;
if
(
mcode
!=
CURLM_CALL_MULTI_PERFORM
)
{
/* if we're still here, there is no input yet
- wait for input */
int
ret
=
input_curl_select
(
c
);
if
(
ret
<=
0
)
/* no data yet or error */
success
=
fill_buffer
(
is
);
if
(
!
success
)
return
0
;
}
mcode
=
curl_multi_perform
(
c
->
multi
,
&
running_handles
);
if
(
mcode
!=
CURLM_OK
&&
mcode
!=
CURLM_CALL_MULTI_PERFORM
)
{
g_warning
(
"curl_multi_perform() failed: %s
\n
"
,
curl_multi_strerror
(
mcode
));
c
->
eof
=
true
;
is
->
ready
=
true
;
return
0
;
}
bret
=
input_curl_multi_info_read
(
is
);
if
(
!
bret
)
return
0
;
}
/* send buffer contents */
...
...
@@ -455,6 +469,7 @@ input_curl_read(struct input_stream *is, void *ptr, size_t size)
nbytes
+=
copy
;
size
-=
copy
;
}
}
while
(
nbytes
==
0
);
if
(
icy_defined
(
&
c
->
icy_metadata
))
copy_icy_tag
(
c
);
...
...
src/riff.c
View file @
71f881d5
...
...
@@ -83,6 +83,11 @@ riff_seek_id3(FILE *file)
return
0
;
size
=
GUINT32_FROM_LE
(
chunk
.
size
);
if
(
size
>
G_MAXINT32
)
/* too dangerous, bail out: possible integer
underflow when casting to off_t */
return
0
;
if
(
size
%
2
!=
0
)
/* pad byte */
++
size
;
...
...
@@ -91,11 +96,6 @@ riff_seek_id3(FILE *file)
/* found it! */
return
size
;
if
((
off_t
)
size
<
0
)
/* integer underflow after cast to signed
type */
return
0
;
ret
=
fseek
(
file
,
size
,
SEEK_CUR
);
if
(
ret
!=
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