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
d35000c2
Commit
d35000c2
authored
May 26, 2014
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/g723_1: fix writing into input frame data and warning
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
2d56f0d0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
g723_1.c
libavcodec/g723_1.c
+7
-1
No files found.
libavcodec/g723_1.c
View file @
d35000c2
...
@@ -2346,11 +2346,15 @@ static int g723_1_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
...
@@ -2346,11 +2346,15 @@ static int g723_1_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
int16_t
weighted_lpc
[
LPC_ORDER
*
SUBFRAMES
<<
1
];
int16_t
weighted_lpc
[
LPC_ORDER
*
SUBFRAMES
<<
1
];
int16_t
vector
[
FRAME_LEN
+
PITCH_MAX
];
int16_t
vector
[
FRAME_LEN
+
PITCH_MAX
];
int
offset
,
ret
;
int
offset
,
ret
;
int16_t
*
in
=
(
const
int16_t
*
)
frame
->
data
[
0
];
int16_t
*
in_orig
=
av_memdup
(
frame
->
data
[
0
],
frame
->
nb_samples
*
sizeof
(
int16_t
));
int16_t
*
in
=
in_orig
;
HFParam
hf
[
4
];
HFParam
hf
[
4
];
int
i
,
j
;
int
i
,
j
;
if
(
!
in
)
return
AVERROR
(
ENOMEM
);
highpass_filter
(
in
,
&
p
->
hpf_fir_mem
,
&
p
->
hpf_iir_mem
);
highpass_filter
(
in
,
&
p
->
hpf_fir_mem
,
&
p
->
hpf_iir_mem
);
memcpy
(
vector
,
p
->
prev_data
,
HALF_FRAME_LEN
*
sizeof
(
int16_t
));
memcpy
(
vector
,
p
->
prev_data
,
HALF_FRAME_LEN
*
sizeof
(
int16_t
));
...
@@ -2456,6 +2460,8 @@ static int g723_1_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
...
@@ -2456,6 +2460,8 @@ static int g723_1_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
offset
+=
LPC_ORDER
;
offset
+=
LPC_ORDER
;
}
}
av_freep
(
&
in_orig
);
in
=
NULL
;
if
((
ret
=
ff_alloc_packet2
(
avctx
,
avpkt
,
24
))
<
0
)
if
((
ret
=
ff_alloc_packet2
(
avctx
,
avpkt
,
24
))
<
0
)
return
ret
;
return
ret
;
...
...
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