Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
4b12930f
Commit
4b12930f
authored
Oct 30, 2013
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/flacdec: use get_unary() simplify code
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
719dbe86
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
6 deletions
+3
-6
flacdec.c
libavcodec/flacdec.c
+3
-6
No files found.
libavcodec/flacdec.c
View file @
4b12930f
...
...
@@ -45,6 +45,8 @@
#include "flacdata.h"
#include "flacdsp.h"
#include "thread.h"
#include "unary.h"
typedef
struct
FLACContext
{
FLACSTREAMINFO
...
...
@@ -357,7 +359,6 @@ static inline int decode_subframe(FLACContext *s, int channel)
if
(
get_bits1
(
&
s
->
gb
))
{
int
left
=
get_bits_left
(
&
s
->
gb
);
wasted
=
1
;
if
(
left
<
0
||
(
left
<
bps
&&
!
show_bits_long
(
&
s
->
gb
,
left
))
||
!
show_bits_long
(
&
s
->
gb
,
bps
))
{
...
...
@@ -366,11 +367,7 @@ static inline int decode_subframe(FLACContext *s, int channel)
bps
,
left
);
return
AVERROR_INVALIDDATA
;
}
while
(
!
get_bits1
(
&
s
->
gb
))
{
wasted
++
;
if
(
get_bits_left
(
&
s
->
gb
)
<=
0
)
return
AVERROR_INVALIDDATA
;
}
wasted
=
1
+
get_unary
(
&
s
->
gb
,
1
,
get_bits_left
(
&
s
->
gb
));
bps
-=
wasted
;
}
if
(
bps
>
32
)
{
...
...
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