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
9da88eec
Commit
9da88eec
authored
Aug 26, 2014
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
decoder/mad: move duplicate code to RecoverFrameError()
parent
f10d9996
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
20 deletions
+16
-20
MadDecoderPlugin.cxx
src/decoder/plugins/MadDecoderPlugin.cxx
+16
-20
No files found.
src/decoder/plugins/MadDecoderPlugin.cxx
View file @
9da88eec
...
...
@@ -410,6 +410,20 @@ id3_tag_query(const void *p0, size_t length)
}
#endif
/* !HAVE_ID3TAG */
static
enum
mp3_action
RecoverFrameError
(
struct
mad_stream
&
stream
)
{
if
(
MAD_RECOVERABLE
(
stream
.
error
))
return
DECODE_SKIP
;
else
if
(
stream
.
error
==
MAD_ERROR_BUFLEN
)
return
DECODE_CONT
;
FormatWarning
(
mad_domain
,
"unrecoverable frame level error: %s"
,
mad_stream_errorstr
(
&
stream
));
return
DECODE_BREAK
;
}
enum
mp3_action
MadDecoder
::
DecodeNextFrameHeader
(
Tag
**
tag
)
{
...
...
@@ -433,16 +447,7 @@ MadDecoder::DecodeNextFrameHeader(Tag **tag)
}
}
if
(
MAD_RECOVERABLE
(
stream
.
error
))
return
DECODE_SKIP
;
else
if
(
stream
.
error
==
MAD_ERROR_BUFLEN
)
return
DECODE_CONT
;
else
{
FormatWarning
(
mad_domain
,
"unrecoverable frame level error: %s"
,
mad_stream_errorstr
(
&
stream
));
return
DECODE_BREAK
;
}
return
RecoverFrameError
(
stream
);
}
enum
mad_layer
new_layer
=
frame
.
header
.
layer
;
...
...
@@ -479,16 +484,7 @@ MadDecoder::DecodeNextFrame()
}
}
if
(
MAD_RECOVERABLE
(
stream
.
error
))
return
DECODE_SKIP
;
else
if
(
stream
.
error
==
MAD_ERROR_BUFLEN
)
return
DECODE_CONT
;
else
{
FormatWarning
(
mad_domain
,
"unrecoverable frame level error: %s"
,
mad_stream_errorstr
(
&
stream
));
return
DECODE_BREAK
;
}
return
RecoverFrameError
(
stream
);
}
return
DECODE_OK
;
...
...
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