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
c3085d7b
Commit
c3085d7b
authored
Dec 14, 2009
by
Max Kellermann
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'v0.15.x'
Conflicts: src/decoder/ffmpeg_plugin.c
parents
179502fe
8f7bc70b
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
53 additions
and
17 deletions
+53
-17
NEWS
NEWS
+8
-0
ffmpeg_plugin.c
src/decoder/ffmpeg_plugin.c
+0
-4
wavpack_plugin.c
src/decoder/wavpack_plugin.c
+1
-1
mapper.c
src/mapper.c
+9
-4
mapper.h
src/mapper.h
+2
-0
mixer_control.c
src/mixer_control.c
+4
-0
playlist_save.c
src/playlist_save.c
+4
-1
stored_playlist.c
src/stored_playlist.c
+24
-6
tag_id3.c
src/tag_id3.c
+1
-1
No files found.
NEWS
View file @
c3085d7b
...
...
@@ -79,6 +79,14 @@ ver 0.16 (20??/??/??)
ver 0.15.7 (2009/??/??)
* tags:
- id3: fix ID3v1 charset conversion
* decoders:
- ffmpeg: don't try to force stereo
* mixer: explicitly close all mixers on shutdown
* mapper: fix memory leak when playlist_directory is not set
* mapper: apply filesystem_charset to playlists
* command: verify playlist name in the "rm" command
ver 0.15.6 (2009/11/18)
...
...
src/decoder/ffmpeg_plugin.c
View file @
c3085d7b
...
...
@@ -311,10 +311,6 @@ ffmpeg_decode_internal(struct ffmpeg_context *ctx)
total_time
=
0
;
if
(
codec_context
->
channels
>
2
)
{
codec_context
->
channels
=
2
;
}
if
(
!
audio_format_init_checked
(
&
audio_format
,
codec_context
->
sample_rate
,
ffmpeg_sample_format
(
codec_context
),
...
...
src/decoder/wavpack_plugin.c
View file @
c3085d7b
...
...
@@ -74,7 +74,7 @@ format_samples_int(int bytes_per_sample, void *buffer, uint32_t count)
switch
(
bytes_per_sample
)
{
case
1
:
{
uchar
*
dst
=
buffer
;
int8_t
*
dst
=
buffer
;
/*
* The asserts like the following one are because we do the
* formatting of samples within a single buffer. The size
...
...
src/mapper.c
View file @
c3085d7b
...
...
@@ -192,14 +192,19 @@ map_spl_path(void)
char
*
map_spl_utf8_to_fs
(
const
char
*
name
)
{
char
*
filename
=
g_strconcat
(
name
,
PLAYLIST_FILE_SUFFIX
,
NULL
);
char
*
path
;
char
*
filename_utf8
,
*
filename_fs
,
*
path
;
if
(
playlist_dir
==
NULL
)
return
NULL
;
path
=
g_build_filename
(
playlist_dir
,
filename
,
NULL
);
g_free
(
filename
);
filename_utf8
=
g_strconcat
(
name
,
PLAYLIST_FILE_SUFFIX
,
NULL
);
filename_fs
=
utf8_to_fs_charset
(
filename_utf8
);
g_free
(
filename_utf8
);
if
(
filename_fs
==
NULL
)
return
NULL
;
path
=
g_build_filename
(
playlist_dir
,
filename_fs
,
NULL
);
g_free
(
filename_fs
);
return
path
;
}
src/mapper.h
View file @
c3085d7b
...
...
@@ -99,6 +99,8 @@ map_spl_path(void);
* Maps a playlist name (without the ".m3u" suffix) to a file system
* path. The return value is allocated on the heap and must be freed
* with g_free().
*
* @return the path in file system encoding, or NULL if mapping failed
*/
char
*
map_spl_utf8_to_fs
(
const
char
*
name
);
...
...
src/mixer_control.c
View file @
c3085d7b
...
...
@@ -50,6 +50,10 @@ mixer_free(struct mixer *mixer)
assert
(
mixer
->
plugin
!=
NULL
);
assert
(
mixer
->
mutex
!=
NULL
);
/* mixers with the "global" flag set might still be open at
this point (see mixer_auto_close()) */
mixer_close
(
mixer
);
g_mutex_free
(
mixer
->
mutex
);
mixer
->
plugin
->
finish
(
mixer
);
...
...
src/playlist_save.c
View file @
c3085d7b
...
...
@@ -72,12 +72,15 @@ spl_save_queue(const char *name_utf8, const struct queue *queue)
char
*
path_fs
;
FILE
*
file
;
if
(
map_spl_path
()
==
NULL
)
return
PLAYLIST_RESULT_DISABLED
;
if
(
!
spl_valid_name
(
name_utf8
))
return
PLAYLIST_RESULT_BAD_NAME
;
path_fs
=
map_spl_utf8_to_fs
(
name_utf8
);
if
(
path_fs
==
NULL
)
return
PLAYLIST_RESULT_
DISABLED
;
return
PLAYLIST_RESULT_
BAD_NAME
;
if
(
g_file_test
(
path_fs
,
G_FILE_TEST_EXISTS
))
{
g_free
(
path_fs
);
...
...
src/stored_playlist.c
View file @
c3085d7b
...
...
@@ -153,9 +153,12 @@ spl_save(GPtrArray *list, const char *utf8path)
assert
(
utf8path
!=
NULL
);
if
(
map_spl_path
()
==
NULL
)
return
PLAYLIST_RESULT_DISABLED
;
path_fs
=
map_spl_utf8_to_fs
(
utf8path
);
if
(
path_fs
==
NULL
)
return
PLAYLIST_RESULT_
DISABLED
;
return
PLAYLIST_RESULT_
BAD_NAME
;
while
(
!
(
file
=
fopen
(
path_fs
,
"w"
))
&&
errno
==
EINTR
);
g_free
(
path_fs
);
...
...
@@ -179,7 +182,7 @@ spl_load(const char *utf8path)
char
buffer
[
MPD_PATH_MAX
];
char
*
path_fs
;
if
(
!
spl_valid_name
(
utf8path
))
if
(
!
spl_valid_name
(
utf8path
)
||
map_spl_path
()
==
NULL
)
return
NULL
;
path_fs
=
map_spl_utf8_to_fs
(
utf8path
);
...
...
@@ -300,12 +303,15 @@ spl_clear(const char *utf8path)
char
*
path_fs
;
FILE
*
file
;
if
(
map_spl_path
()
==
NULL
)
return
PLAYLIST_RESULT_DISABLED
;
if
(
!
spl_valid_name
(
utf8path
))
return
PLAYLIST_RESULT_BAD_NAME
;
path_fs
=
map_spl_utf8_to_fs
(
utf8path
);
if
(
path_fs
==
NULL
)
return
PLAYLIST_RESULT_
DISABLED
;
return
PLAYLIST_RESULT_
BAD_NAME
;
while
(
!
(
file
=
fopen
(
path_fs
,
"w"
))
&&
errno
==
EINTR
);
g_free
(
path_fs
);
...
...
@@ -324,9 +330,15 @@ spl_delete(const char *name_utf8)
char
*
path_fs
;
int
ret
;
if
(
map_spl_path
()
==
NULL
)
return
PLAYLIST_RESULT_DISABLED
;
if
(
!
spl_valid_name
(
name_utf8
))
return
PLAYLIST_RESULT_BAD_NAME
;
path_fs
=
map_spl_utf8_to_fs
(
name_utf8
);
if
(
path_fs
==
NULL
)
return
PLAYLIST_RESULT_
DISABLED
;
return
PLAYLIST_RESULT_
BAD_NAME
;
ret
=
unlink
(
path_fs
);
g_free
(
path_fs
);
...
...
@@ -371,12 +383,15 @@ spl_append_song(const char *utf8path, struct song *song)
struct
stat
st
;
char
*
path_fs
;
if
(
map_spl_path
()
==
NULL
)
return
PLAYLIST_RESULT_DISABLED
;
if
(
!
spl_valid_name
(
utf8path
))
return
PLAYLIST_RESULT_BAD_NAME
;
path_fs
=
map_spl_utf8_to_fs
(
utf8path
);
if
(
path_fs
==
NULL
)
return
PLAYLIST_RESULT_
DISABLED
;
return
PLAYLIST_RESULT_
BAD_NAME
;
while
(
!
(
file
=
fopen
(
path_fs
,
"a"
))
&&
errno
==
EINTR
);
g_free
(
path_fs
);
...
...
@@ -446,6 +461,9 @@ spl_rename(const char *utf8from, const char *utf8to)
char
*
from_path_fs
,
*
to_path_fs
;
static
enum
playlist_result
ret
;
if
(
map_spl_path
()
==
NULL
)
return
PLAYLIST_RESULT_DISABLED
;
if
(
!
spl_valid_name
(
utf8from
)
||
!
spl_valid_name
(
utf8to
))
return
PLAYLIST_RESULT_BAD_NAME
;
...
...
@@ -455,7 +473,7 @@ spl_rename(const char *utf8from, const char *utf8to)
if
(
from_path_fs
!=
NULL
&&
to_path_fs
!=
NULL
)
ret
=
spl_rename_internal
(
from_path_fs
,
to_path_fs
);
else
ret
=
PLAYLIST_RESULT_
DISABLED
;
ret
=
PLAYLIST_RESULT_
BAD_NAME
;
g_free
(
from_path_fs
);
g_free
(
to_path_fs
);
...
...
src/tag_id3.c
View file @
c3085d7b
...
...
@@ -96,7 +96,7 @@ import_id3_string(bool is_id3v1, const id3_ucs4_t *ucs4)
utf8
=
(
id3_utf8_t
*
)
g_convert_with_fallback
((
const
char
*
)
isostr
,
-
1
,
encoding
,
"utf-8"
,
"utf-8"
,
encoding
,
NULL
,
NULL
,
NULL
,
NULL
);
if
(
utf8
==
NULL
)
{
g_debug
(
"Unable to convert %s string to UTF-8: '%s'"
,
...
...
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