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
7013f9fc
Commit
7013f9fc
authored
Oct 03, 2009
by
Max Kellermann
Browse files
Options
Browse Files
Download
Plain Diff
Merged release 0.15.4 from branch 'v0.15.x'
Conflicts: NEWS configure.ac
parents
31cabc75
325e380b
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
51 additions
and
6 deletions
+51
-6
NEWS
NEWS
+3
-1
faad_plugin.c
src/decoder/faad_plugin.c
+6
-2
ffmpeg_plugin.c
src/decoder/ffmpeg_plugin.c
+5
-2
decoder_buffer.c
src/decoder_buffer.c
+26
-0
decoder_buffer.h
src/decoder_buffer.h
+10
-0
mms_input_plugin.c
src/input/mms_input_plugin.c
+1
-1
No files found.
NEWS
View file @
7013f9fc
...
...
@@ -39,9 +39,11 @@ ver 0.16 (20??/??/??)
* obey $(sysconfdir) for default mpd.conf location
ver 0.15.4 (2009/
??/??
)
ver 0.15.4 (2009/
10/03
)
* decoders:
- vorbis: revert "faster tag scanning with ov_test_callback()"
- faad: skip assertion failure on large ID3 tags
- ffmpeg: use the "artist" tag if "author" is not present
* output:
- osx: fix the OS X 10.6 build
...
...
src/decoder/faad_plugin.c
View file @
7013f9fc
...
...
@@ -162,6 +162,7 @@ faad_song_duration(struct decoder_buffer *buffer, struct input_stream *is)
size_t
tagsize
;
const
unsigned
char
*
data
;
size_t
length
;
bool
success
;
fileread
=
is
->
size
>=
0
?
is
->
size
:
0
;
...
...
@@ -179,8 +180,11 @@ faad_song_duration(struct decoder_buffer *buffer, struct input_stream *is)
tagsize
+=
10
;
decoder_buffer_consume
(
buffer
,
tagsize
);
decoder_buffer_fill
(
buffer
);
success
=
decoder_buffer_skip
(
buffer
,
tagsize
)
&&
decoder_buffer_fill
(
buffer
);
if
(
!
success
)
return
-
1
;
data
=
decoder_buffer_read
(
buffer
,
&
length
);
if
(
data
==
NULL
)
return
-
1
;
...
...
src/decoder/ffmpeg_plugin.c
View file @
7013f9fc
...
...
@@ -339,7 +339,7 @@ ffmpeg_decode(struct decoder *decoder, struct input_stream *input)
}
#if LIBAVFORMAT_VERSION_INT >= ((52<<16)+(31<<8)+0)
static
void
static
bool
ffmpeg_copy_metadata
(
struct
tag
*
tag
,
AVMetadata
*
m
,
enum
tag_type
type
,
const
char
*
name
)
{
...
...
@@ -347,6 +347,7 @@ ffmpeg_copy_metadata(struct tag *tag, AVMetadata *m,
while
((
mt
=
av_metadata_get
(
m
,
name
,
mt
,
0
))
!=
NULL
)
tag_add_item
(
tag
,
type
,
mt
->
value
);
return
mt
!=
NULL
;
}
#endif
...
...
@@ -363,7 +364,9 @@ static bool ffmpeg_tag_internal(struct ffmpeg_context *ctx)
av_metadata_conv
(
f
,
NULL
,
f
->
iformat
->
metadata_conv
);
ffmpeg_copy_metadata
(
tag
,
f
->
metadata
,
TAG_ITEM_TITLE
,
"title"
);
ffmpeg_copy_metadata
(
tag
,
f
->
metadata
,
TAG_ITEM_ARTIST
,
"author"
);
if
(
!
ffmpeg_copy_metadata
(
tag
,
f
->
metadata
,
TAG_ITEM_ARTIST
,
"author"
))
ffmpeg_copy_metadata
(
tag
,
f
->
metadata
,
TAG_ITEM_ARTIST
,
"artist"
);
ffmpeg_copy_metadata
(
tag
,
f
->
metadata
,
TAG_ITEM_ALBUM
,
"album"
);
ffmpeg_copy_metadata
(
tag
,
f
->
metadata
,
TAG_ITEM_COMMENT
,
"comment"
);
ffmpeg_copy_metadata
(
tag
,
f
->
metadata
,
TAG_ITEM_GENRE
,
"genre"
);
...
...
src/decoder_buffer.c
View file @
7013f9fc
...
...
@@ -138,3 +138,29 @@ decoder_buffer_consume(struct decoder_buffer *buffer, size_t nbytes)
assert
(
buffer
->
consumed
<=
buffer
->
length
);
}
bool
decoder_buffer_skip
(
struct
decoder_buffer
*
buffer
,
size_t
nbytes
)
{
size_t
length
;
const
void
*
data
;
bool
success
;
/* this could probably be optimized by seeking */
while
(
true
)
{
data
=
decoder_buffer_read
(
buffer
,
&
length
);
if
(
data
!=
NULL
)
{
if
(
length
>
nbytes
)
length
=
nbytes
;
decoder_buffer_consume
(
buffer
,
length
);
nbytes
-=
length
;
if
(
nbytes
==
0
)
return
true
;
}
success
=
decoder_buffer_fill
(
buffer
);
if
(
!
success
)
return
false
;
}
}
src/decoder_buffer.h
View file @
7013f9fc
...
...
@@ -93,4 +93,14 @@ decoder_buffer_read(const struct decoder_buffer *buffer, size_t *length_r);
void
decoder_buffer_consume
(
struct
decoder_buffer
*
buffer
,
size_t
nbytes
);
/**
* Skips the specified number of bytes, discarding its data.
*
* @param buffer the decoder_buffer object
* @param nbytes the number of bytes to skip
* @return true on success, false on error
*/
bool
decoder_buffer_skip
(
struct
decoder_buffer
*
buffer
,
size_t
nbytes
);
#endif
src/input/mms_input_plugin.c
View file @
7013f9fc
...
...
@@ -27,7 +27,7 @@
#include <errno.h>
#undef G_LOG_DOMAIN
#define G_LOG_DOMAIN "
jack
"
#define G_LOG_DOMAIN "
input_mms
"
struct
input_mms
{
mmsx_t
*
mms
;
...
...
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