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
20e940e7
Commit
20e940e7
authored
Jul 31, 2012
by
Stefano Sabatini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi/testsrc: free the context in uninit
Keeping stuff in the context can be useful for debugging purposes.
parent
c2502b7b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
vsrc_testsrc.c
libavfilter/vsrc_testsrc.c
+10
-2
No files found.
libavfilter/vsrc_testsrc.c
View file @
20e940e7
...
...
@@ -92,13 +92,11 @@ static av_cold int init(AVFilterContext *ctx, const char *args)
av_log
(
ctx
,
AV_LOG_ERROR
,
"Invalid frame rate: '%s'
\n
"
,
test
->
rate
);
return
ret
;
}
av_freep
(
&
test
->
rate
);
if
(
test
->
duration
&&
(
ret
=
av_parse_time
(
&
duration
,
test
->
duration
,
1
))
<
0
)
{
av_log
(
ctx
,
AV_LOG_ERROR
,
"Invalid duration: '%s'
\n
"
,
test
->
duration
);
return
ret
;
}
av_freep
(
&
test
->
duration
);
if
(
test
->
nb_decimals
&&
strcmp
(
ctx
->
filter
->
name
,
"testsrc"
))
{
av_log
(
ctx
,
AV_LOG_WARNING
,
...
...
@@ -120,6 +118,13 @@ static av_cold int init(AVFilterContext *ctx, const char *args)
return
0
;
}
static
av_cold
void
uninit
(
AVFilterContext
*
ctx
)
{
TestSourceContext
*
test
=
ctx
->
priv
;
av_opt_free
(
test
);
}
static
int
config_props
(
AVFilterLink
*
outlink
)
{
TestSourceContext
*
test
=
outlink
->
src
->
priv
;
...
...
@@ -186,6 +191,7 @@ AVFilter avfilter_vsrc_nullsrc = {
.
name
=
"nullsrc"
,
.
description
=
NULL_IF_CONFIG_SMALL
(
"Null video source, return unprocessed video frames."
),
.
init
=
nullsrc_init
,
.
uninit
=
uninit
,
.
priv_size
=
sizeof
(
TestSourceContext
),
.
inputs
=
(
const
AVFilterPad
[])
{{
.
name
=
NULL
}},
...
...
@@ -402,6 +408,7 @@ AVFilter avfilter_vsrc_testsrc = {
.
description
=
NULL_IF_CONFIG_SMALL
(
"Generate test pattern."
),
.
priv_size
=
sizeof
(
TestSourceContext
),
.
init
=
test_init
,
.
uninit
=
uninit
,
.
query_formats
=
test_query_formats
,
...
...
@@ -526,6 +533,7 @@ AVFilter avfilter_vsrc_rgbtestsrc = {
.
description
=
NULL_IF_CONFIG_SMALL
(
"Generate RGB test pattern."
),
.
priv_size
=
sizeof
(
TestSourceContext
),
.
init
=
rgbtest_init
,
.
uninit
=
uninit
,
.
query_formats
=
rgbtest_query_formats
,
...
...
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