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
f2193569
Commit
f2193569
authored
Jan 13, 2012
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
8svx: fix memleak in iff-fibonacci fate test.
parent
e3127db4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
8svx.c
libavcodec/8svx.c
+3
-1
No files found.
libavcodec/8svx.c
View file @
f2193569
...
@@ -110,7 +110,7 @@ static int eightsvx_decode_frame(AVCodecContext *avctx, void *data,
...
@@ -110,7 +110,7 @@ static int eightsvx_decode_frame(AVCodecContext *avctx, void *data,
/* decode and interleave the first packet */
/* decode and interleave the first packet */
if
(
!
esc
->
samples
&&
avpkt
)
{
if
(
!
esc
->
samples
&&
avpkt
)
{
uint8_t
*
deinterleaved_samples
;
uint8_t
*
deinterleaved_samples
,
*
p
=
NULL
;
esc
->
samples_size
=
avctx
->
codec
->
id
==
CODEC_ID_8SVX_RAW
||
avctx
->
codec
->
id
==
CODEC_ID_PCM_S8_PLANAR
?
esc
->
samples_size
=
avctx
->
codec
->
id
==
CODEC_ID_8SVX_RAW
||
avctx
->
codec
->
id
==
CODEC_ID_PCM_S8_PLANAR
?
avpkt
->
size
:
avctx
->
channels
+
(
avpkt
->
size
-
avctx
->
channels
)
*
2
;
avpkt
->
size
:
avctx
->
channels
+
(
avpkt
->
size
-
avctx
->
channels
)
*
2
;
...
@@ -129,6 +129,7 @@ static int eightsvx_decode_frame(AVCodecContext *avctx, void *data,
...
@@ -129,6 +129,7 @@ static int eightsvx_decode_frame(AVCodecContext *avctx, void *data,
}
}
if
(
!
(
deinterleaved_samples
=
av_mallocz
(
n
)))
if
(
!
(
deinterleaved_samples
=
av_mallocz
(
n
)))
return
AVERROR
(
ENOMEM
);
return
AVERROR
(
ENOMEM
);
p
=
deinterleaved_samples
;
/* the uncompressed starting value is contained in the first byte */
/* the uncompressed starting value is contained in the first byte */
if
(
avctx
->
channels
==
2
)
{
if
(
avctx
->
channels
==
2
)
{
...
@@ -145,6 +146,7 @@ static int eightsvx_decode_frame(AVCodecContext *avctx, void *data,
...
@@ -145,6 +146,7 @@ static int eightsvx_decode_frame(AVCodecContext *avctx, void *data,
interleave_stereo
(
esc
->
samples
,
deinterleaved_samples
,
esc
->
samples_size
);
interleave_stereo
(
esc
->
samples
,
deinterleaved_samples
,
esc
->
samples_size
);
else
else
memcpy
(
esc
->
samples
,
deinterleaved_samples
,
esc
->
samples_size
);
memcpy
(
esc
->
samples
,
deinterleaved_samples
,
esc
->
samples_size
);
av_freep
(
&
p
);
}
}
/* get output buffer */
/* get output buffer */
...
...
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