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
859bdc33
Commit
859bdc33
authored
Oct 27, 2011
by
Justin Ruggles
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cin audio: use local variable for delta value
parent
64e19ba4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
dsicinav.c
libavcodec/dsicinav.c
+8
-5
No files found.
libavcodec/dsicinav.c
View file @
859bdc33
...
...
@@ -328,21 +328,24 @@ static int cinaudio_decode_frame(AVCodecContext *avctx,
CinAudioContext
*
cin
=
avctx
->
priv_data
;
const
uint8_t
*
src
=
buf
;
int16_t
*
samples
=
data
;
int
delta
;
buf_size
=
FFMIN
(
buf_size
,
*
data_size
/
2
);
delta
=
cin
->
delta
;
if
(
cin
->
initial_decode_frame
)
{
cin
->
initial_decode_frame
=
0
;
cin
->
delta
=
(
int16_t
)
AV_RL16
(
src
);
src
+=
2
;
*
samples
++
=
cin
->
delta
;
delta
=
(
int16_t
)
AV_RL16
(
src
);
src
+=
2
;
*
samples
++
=
delta
;
buf_size
-=
2
;
}
while
(
buf_size
>
0
)
{
cin
->
delta
+=
cinaudio_delta16_table
[
*
src
++
];
cin
->
delta
=
av_clip_int16
(
cin
->
delta
);
*
samples
++
=
cin
->
delta
;
delta
+=
cinaudio_delta16_table
[
*
src
++
];
delta
=
av_clip_int16
(
delta
);
*
samples
++
=
delta
;
--
buf_size
;
}
cin
->
delta
=
delta
;
*
data_size
=
(
uint8_t
*
)
samples
-
(
uint8_t
*
)
data
;
...
...
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