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
142894d7
Commit
142894d7
authored
Nov 25, 2015
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter: do not leak frame if ff_get_audio_buffer() fails
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
fd3df296
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
4 deletions
+12
-4
af_adelay.c
libavfilter/af_adelay.c
+3
-1
af_aecho.c
libavfilter/af_aecho.c
+3
-1
af_biquads.c
libavfilter/af_biquads.c
+3
-1
af_chorus.c
libavfilter/af_chorus.c
+3
-1
No files found.
libavfilter/af_adelay.c
View file @
142894d7
...
...
@@ -192,8 +192,10 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
return
ff_filter_frame
(
ctx
->
outputs
[
0
],
frame
);
out_frame
=
ff_get_audio_buffer
(
inlink
,
frame
->
nb_samples
);
if
(
!
out_frame
)
if
(
!
out_frame
)
{
av_frame_free
(
&
frame
);
return
AVERROR
(
ENOMEM
);
}
av_frame_copy_props
(
out_frame
,
frame
);
for
(
i
=
0
;
i
<
s
->
nb_delays
;
i
++
)
{
...
...
libavfilter/af_aecho.c
View file @
142894d7
...
...
@@ -279,8 +279,10 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
out_frame
=
frame
;
}
else
{
out_frame
=
ff_get_audio_buffer
(
inlink
,
frame
->
nb_samples
);
if
(
!
out_frame
)
if
(
!
out_frame
)
{
av_frame_free
(
&
frame
);
return
AVERROR
(
ENOMEM
);
}
av_frame_copy_props
(
out_frame
,
frame
);
}
...
...
libavfilter/af_biquads.c
View file @
142894d7
...
...
@@ -401,8 +401,10 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *buf)
out_buf
=
buf
;
}
else
{
out_buf
=
ff_get_audio_buffer
(
inlink
,
nb_samples
);
if
(
!
out_buf
)
if
(
!
out_buf
)
{
av_frame_free
(
&
buf
);
return
AVERROR
(
ENOMEM
);
}
av_frame_copy_props
(
out_buf
,
buf
);
}
...
...
libavfilter/af_chorus.c
View file @
142894d7
...
...
@@ -247,8 +247,10 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
out_frame
=
frame
;
}
else
{
out_frame
=
ff_get_audio_buffer
(
inlink
,
frame
->
nb_samples
);
if
(
!
out_frame
)
if
(
!
out_frame
)
{
av_frame_free
(
&
frame
);
return
AVERROR
(
ENOMEM
);
}
av_frame_copy_props
(
out_frame
,
frame
);
}
...
...
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