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
ccbb5c3e
Commit
ccbb5c3e
authored
Jul 10, 2014
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
decoder/audiofile: log libaudiofile errors
parent
49b63e08
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
4 deletions
+16
-4
NEWS
NEWS
+1
-0
AudiofileDecoderPlugin.cxx
src/decoder/plugins/AudiofileDecoderPlugin.cxx
+15
-4
No files found.
NEWS
View file @
ccbb5c3e
...
...
@@ -31,6 +31,7 @@ ver 0.19 (not yet released)
* decoder:
- vorbis, flac, opus: honor DESCRIPTION= tag in Xiph-based files as a comment to the song
- audiofile: support scanning remote files
- audiofile: log libaudiofile errors
* encoder:
- shine: new encoder plugin
* threads:
...
...
src/decoder/plugins/AudiofileDecoderPlugin.cxx
View file @
ccbb5c3e
...
...
@@ -36,6 +36,19 @@
static
constexpr
Domain
audiofile_domain
(
"audiofile"
);
static
void
audiofile_error_func
(
long
,
const
char
*
msg
)
{
LogWarning
(
audiofile_domain
,
msg
);
}
static
bool
audiofile_init
(
const
config_param
&
)
{
afSetErrorHandler
(
audiofile_error_func
);
return
true
;
}
struct
AudioFileInputStream
{
Decoder
*
const
decoder
;
InputStream
&
is
;
...
...
@@ -178,10 +191,8 @@ audiofile_stream_decode(Decoder &decoder, InputStream &is)
AFvirtualfile
*
const
vf
=
setup_virtual_fops
(
afis
);
const
AFfilehandle
fh
=
afOpenVirtualFile
(
vf
,
"r"
,
nullptr
);
if
(
fh
==
AF_NULL_FILEHANDLE
)
{
LogWarning
(
audiofile_domain
,
"failed to input stream"
);
if
(
fh
==
AF_NULL_FILEHANDLE
)
return
;
}
Error
error
;
AudioFormat
audio_format
;
...
...
@@ -275,7 +286,7 @@ static const char *const audiofile_mime_types[] = {
const
struct
DecoderPlugin
audiofile_decoder_plugin
=
{
"audiofile"
,
nullptr
,
audiofile_init
,
nullptr
,
audiofile_stream_decode
,
nullptr
,
...
...
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