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
c33bbd94
Commit
c33bbd94
authored
Nov 19, 2009
by
Max Kellermann
Browse files
Options
Browse Files
Download
Plain Diff
Merged release 0.15.6 from branch 'v0.15.x'
Conflicts: NEWS configure.ac
parents
d37b4bb1
21fdf47b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
10 deletions
+36
-10
NEWS
NEWS
+8
-1
_flac_common.c
src/decoder/_flac_common.c
+3
-3
ffmpeg_plugin.c
src/decoder/ffmpeg_plugin.c
+24
-5
tag_id3.c
src/tag_id3.c
+1
-1
No files found.
NEWS
View file @
c33bbd94
...
...
@@ -76,16 +76,23 @@ ver 0.16 (20??/??/??)
* require GLib 2.12
ver 0.15.6 (2009/??/??)
ver 0.15.7 (2009/??/??)
ver 0.15.6 (2009/11/18)
* input:
- lastfm: fixed variable name in GLib<2.16 code path
- input/mms: require libmms 0.4
* archive:
- zzip: require libzzip 0.13
* tags:
- id3: allow 4 MB RIFF/AIFF tags
* decoders:
- ffmpeg: convert metadata
- ffmpeg: align the output buffer
- oggflac: rewind stream after FLAC detection
- flac: fixed CUE seeking range check
- flac: fixed NULL pointer dereference in CUE code
* output_thread: check again if output is open on PAUSE
* update: delete ignored symlinks from database
* database: increased maximum line length to 32 kB
...
...
src/decoder/_flac_common.c
View file @
c33bbd94
...
...
@@ -223,11 +223,11 @@ flac_vtrack_tnum(const char* fname)
* another/better way would be to use tag struct
*/
char
*
ptr
=
strrchr
(
fname
,
'_'
);
if
(
ptr
==
NULL
)
return
0
;
// copy ascii tracknumber to int
char
vtrack
[
4
];
g_strlcpy
(
vtrack
,
++
ptr
,
4
);
return
(
unsigned
int
)
strtol
(
vtrack
,
NULL
,
10
);
return
(
unsigned
int
)
strtol
(
++
ptr
,
NULL
,
10
);
}
#endif
/* FLAC_API_VERSION_CURRENT >= 7 */
src/decoder/ffmpeg_plugin.c
View file @
c33bbd94
...
...
@@ -210,6 +210,21 @@ ffmpeg_helper(struct input_stream *input,
return
ret
;
}
/**
* On some platforms, libavcodec wants the output buffer aligned to 16
* bytes (because it uses SSE/Altivec internally). This function
* returns the aligned version of the specified buffer, and corrects
* the buffer size.
*/
static
void
*
align16
(
void
*
p
,
size_t
*
length_p
)
{
unsigned
add
=
16
-
(
size_t
)
p
%
16
;
*
length_p
-=
add
;
return
(
char
*
)
p
+
add
;
}
static
enum
decoder_command
ffmpeg_send_packet
(
struct
decoder
*
decoder
,
struct
input_stream
*
is
,
const
AVPacket
*
packet
,
...
...
@@ -218,7 +233,9 @@ ffmpeg_send_packet(struct decoder *decoder, struct input_stream *is,
{
enum
decoder_command
cmd
=
DECODE_COMMAND_NONE
;
int
position
;
uint8_t
audio_buf
[(
AVCODEC_MAX_AUDIO_FRAME_SIZE
*
3
)
/
2
];
uint8_t
audio_buf
[(
AVCODEC_MAX_AUDIO_FRAME_SIZE
*
3
)
/
2
+
16
];
int16_t
*
aligned_buffer
;
size_t
buffer_size
;
int
len
,
audio_size
;
uint8_t
*
packet_data
;
int
packet_size
;
...
...
@@ -226,11 +243,13 @@ ffmpeg_send_packet(struct decoder *decoder, struct input_stream *is,
packet_data
=
packet
->
data
;
packet_size
=
packet
->
size
;
buffer_size
=
sizeof
(
audio_buf
);
aligned_buffer
=
align16
(
audio_buf
,
&
buffer_size
);
while
((
packet_size
>
0
)
&&
(
cmd
==
DECODE_COMMAND_NONE
))
{
audio_size
=
sizeof
(
audio_buf
)
;
audio_size
=
buffer_size
;
len
=
avcodec_decode_audio2
(
codec_context
,
(
int16_t
*
)
audio_buf
,
&
audio_size
,
aligned_buffer
,
&
audio_size
,
packet_data
,
packet_size
);
if
(
len
<
0
)
{
...
...
@@ -251,7 +270,7 @@ ffmpeg_send_packet(struct decoder *decoder, struct input_stream *is,
:
0
;
cmd
=
decoder_data
(
decoder
,
is
,
a
udio_buf
,
audio_size
,
a
ligned_buffer
,
audio_size
,
position
,
codec_context
->
bit_rate
/
1000
,
NULL
);
}
...
...
src/tag_id3.c
View file @
c33bbd94
...
...
@@ -472,7 +472,7 @@ tag_id3_riff_aiff_load(FILE *file)
if
(
size
==
0
)
return
NULL
;
if
(
size
>
256
*
1024
)
if
(
size
>
4
*
1024
*
1024
)
/* too large, don't allocate so much memory */
return
NULL
;
...
...
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