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
fddef964
Commit
fddef964
authored
Oct 18, 2019
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/vf_colorspace: fix memmory leaks
Fixes #8303
parent
daf2bef9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
vf_colorspace.c
libavfilter/vf_colorspace.c
+11
-2
No files found.
libavfilter/vf_colorspace.c
View file @
fddef964
...
@@ -780,6 +780,7 @@ static int filter_frame(AVFilterLink *link, AVFrame *in)
...
@@ -780,6 +780,7 @@ static int filter_frame(AVFilterLink *link, AVFrame *in)
res
=
av_frame_copy_props
(
out
,
in
);
res
=
av_frame_copy_props
(
out
,
in
);
if
(
res
<
0
)
{
if
(
res
<
0
)
{
av_frame_free
(
&
in
);
av_frame_free
(
&
in
);
av_frame_free
(
&
out
);
return
res
;
return
res
;
}
}
...
@@ -839,13 +840,18 @@ static int filter_frame(AVFilterLink *link, AVFrame *in)
...
@@ -839,13 +840,18 @@ static int filter_frame(AVFilterLink *link, AVFrame *in)
!
s
->
dither_scratch_base
[
1
][
0
]
||
!
s
->
dither_scratch_base
[
1
][
1
]
||
!
s
->
dither_scratch_base
[
1
][
0
]
||
!
s
->
dither_scratch_base
[
1
][
1
]
||
!
s
->
dither_scratch_base
[
2
][
0
]
||
!
s
->
dither_scratch_base
[
2
][
1
])
{
!
s
->
dither_scratch_base
[
2
][
0
]
||
!
s
->
dither_scratch_base
[
2
][
1
])
{
uninit
(
ctx
);
uninit
(
ctx
);
av_frame_free
(
&
in
);
av_frame_free
(
&
out
);
return
AVERROR
(
ENOMEM
);
return
AVERROR
(
ENOMEM
);
}
}
s
->
rgb_sz
=
rgb_sz
;
s
->
rgb_sz
=
rgb_sz
;
}
}
res
=
create_filtergraph
(
ctx
,
in
,
out
);
res
=
create_filtergraph
(
ctx
,
in
,
out
);
if
(
res
<
0
)
if
(
res
<
0
)
{
av_frame_free
(
&
in
);
av_frame_free
(
&
out
);
return
res
;
return
res
;
}
s
->
rgb_stride
=
rgb_stride
/
sizeof
(
int16_t
);
s
->
rgb_stride
=
rgb_stride
/
sizeof
(
int16_t
);
td
.
in
=
in
;
td
.
in
=
in
;
td
.
out
=
out
;
td
.
out
=
out
;
...
@@ -859,8 +865,11 @@ static int filter_frame(AVFilterLink *link, AVFrame *in)
...
@@ -859,8 +865,11 @@ static int filter_frame(AVFilterLink *link, AVFrame *in)
td
.
out_ss_h
=
av_pix_fmt_desc_get
(
out
->
format
)
->
log2_chroma_h
;
td
.
out_ss_h
=
av_pix_fmt_desc_get
(
out
->
format
)
->
log2_chroma_h
;
if
(
s
->
yuv2yuv_passthrough
)
{
if
(
s
->
yuv2yuv_passthrough
)
{
res
=
av_frame_copy
(
out
,
in
);
res
=
av_frame_copy
(
out
,
in
);
if
(
res
<
0
)
if
(
res
<
0
)
{
av_frame_free
(
&
in
);
av_frame_free
(
&
out
);
return
res
;
return
res
;
}
}
else
{
}
else
{
ctx
->
internal
->
execute
(
ctx
,
convert
,
&
td
,
NULL
,
ctx
->
internal
->
execute
(
ctx
,
convert
,
&
td
,
NULL
,
FFMIN
((
in
->
height
+
1
)
>>
1
,
ff_filter_get_nb_threads
(
ctx
)));
FFMIN
((
in
->
height
+
1
)
>>
1
,
ff_filter_get_nb_threads
(
ctx
)));
...
...
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