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
d2604f92
Commit
d2604f92
authored
Sep 24, 2011
by
Justin Ruggles
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wavpack: calculate bpp using av_get_bytes_per_sample()
parent
ddfb8e1a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
3 deletions
+1
-3
wavpack.c
libavcodec/wavpack.c
+1
-3
No files found.
libavcodec/wavpack.c
View file @
d2604f92
...
...
@@ -808,15 +808,13 @@ static int wavpack_decode_block(AVCodecContext *avctx, int block_no,
}
s
->
frame_flags
=
AV_RL32
(
buf
);
buf
+=
4
;
if
(
s
->
frame_flags
&
0x80
){
bpp
=
sizeof
(
float
);
avctx
->
sample_fmt
=
AV_SAMPLE_FMT_FLT
;
}
else
if
((
s
->
frame_flags
&
0x03
)
<=
1
){
bpp
=
2
;
avctx
->
sample_fmt
=
AV_SAMPLE_FMT_S16
;
}
else
{
bpp
=
4
;
avctx
->
sample_fmt
=
AV_SAMPLE_FMT_S32
;
}
bpp
=
av_get_bytes_per_sample
(
avctx
->
sample_fmt
);
samples
=
(
uint8_t
*
)
samples
+
bpp
*
wc
->
ch_offset
;
s
->
stereo
=
!
(
s
->
frame_flags
&
WV_MONO
);
...
...
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