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
23465ad9
Commit
23465ad9
authored
Nov 11, 2014
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
decoder/opus: improved error logging
parent
7886a14b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
4 deletions
+12
-4
NEWS
NEWS
+1
-0
OpusDecoderPlugin.cxx
src/decoder/plugins/OpusDecoderPlugin.cxx
+11
-4
No files found.
NEWS
View file @
23465ad9
...
...
@@ -10,6 +10,7 @@ ver 0.19.3 (not yet released)
- audiofile: fix bit rate calculation
- ffmpeg: support opus
- opus: fix bogus duration on streams
- opus: improved error logging
* fix distorted audio with soxr resampler
* fix build failure on Mac OS X with non-Apple compilers
...
...
src/decoder/plugins/OpusDecoderPlugin.cxx
View file @
23465ad9
...
...
@@ -167,8 +167,10 @@ MPDOpusDecoder::HandlePacket(const ogg_packet &packet)
if
(
packet
.
b_o_s
)
return
HandleBOS
(
packet
);
else
if
(
opus_decoder
==
nullptr
)
else
if
(
opus_decoder
==
nullptr
)
{
LogDebug
(
opus_domain
,
"BOS packet expected"
);
return
DecoderCommand
::
STOP
;
}
if
(
IsOpusTags
(
packet
))
return
HandleTags
(
packet
);
...
...
@@ -229,13 +231,17 @@ MPDOpusDecoder::HandleBOS(const ogg_packet &packet)
{
assert
(
packet
.
b_o_s
);
if
(
opus_decoder
!=
nullptr
||
!
IsOpusHead
(
packet
))
if
(
opus_decoder
!=
nullptr
||
!
IsOpusHead
(
packet
))
{
LogDebug
(
opus_domain
,
"BOS packet must be OpusHead"
);
return
DecoderCommand
::
STOP
;
}
unsigned
channels
;
if
(
!
ScanOpusHeader
(
packet
.
packet
,
packet
.
bytes
,
channels
)
||
!
audio_valid_channel_count
(
channels
))
!
audio_valid_channel_count
(
channels
))
{
LogDebug
(
opus_domain
,
"Malformed BOS packet"
);
return
DecoderCommand
::
STOP
;
}
assert
(
opus_decoder
==
nullptr
);
assert
(
output_buffer
==
nullptr
);
...
...
@@ -307,7 +313,8 @@ MPDOpusDecoder::HandleAudio(const ogg_packet &packet)
output_buffer
,
opus_output_buffer_frames
,
0
);
if
(
nframes
<
0
)
{
LogError
(
opus_domain
,
opus_strerror
(
nframes
));
FormatError
(
opus_domain
,
"libopus error: %s"
,
opus_strerror
(
nframes
));
return
DecoderCommand
::
STOP
;
}
...
...
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