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
de157f21
Commit
de157f21
authored
Oct 31, 2011
by
Justin Ruggles
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
apedec: do not needlessly copy s->samples to nblocks.
also move nblocks to the local scope where it is used.
parent
4315c7d3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
apedec.c
libavcodec/apedec.c
+2
-4
No files found.
libavcodec/apedec.c
View file @
de157f21
...
...
@@ -814,7 +814,6 @@ static int ape_decode_frame(AVCodecContext *avctx,
int
buf_size
=
avpkt
->
size
;
APEContext
*
s
=
avctx
->
priv_data
;
int16_t
*
samples
=
data
;
uint32_t
nblocks
;
int
i
;
int
blockstodecode
,
out_size
;
int
bytes_used
;
...
...
@@ -824,7 +823,7 @@ static int ape_decode_frame(AVCodecContext *avctx,
av_assert0
(
s
->
samples
>=
0
);
if
(
!
s
->
samples
){
uint32_t
offset
;
uint32_t
nblocks
,
offset
;
void
*
tmp_data
;
if
(
buf_size
<
8
)
{
...
...
@@ -874,8 +873,7 @@ static int ape_decode_frame(AVCodecContext *avctx,
return
buf_size
;
}
nblocks
=
s
->
samples
;
blockstodecode
=
FFMIN
(
BLOCKS_PER_LOOP
,
nblocks
);
blockstodecode
=
FFMIN
(
BLOCKS_PER_LOOP
,
s
->
samples
);
out_size
=
blockstodecode
*
avctx
->
channels
*
av_get_bytes_per_sample
(
avctx
->
sample_fmt
);
...
...
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