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
c7a99d99
Commit
c7a99d99
authored
Dec 02, 2013
by
Stefano Sabatini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
doc/examples/filtering_video: do not make use of AVBufferSinkParams
Set the value on the filter context instead. Simplify.
parent
3aa60180
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
filtering_video.c
doc/examples/filtering_video.c
+8
-5
No files found.
doc/examples/filtering_video.c
View file @
c7a99d99
...
...
@@ -91,7 +91,6 @@ static int init_filters(const char *filters_descr)
AVFilterInOut
*
outputs
=
avfilter_inout_alloc
();
AVFilterInOut
*
inputs
=
avfilter_inout_alloc
();
enum
AVPixelFormat
pix_fmts
[]
=
{
AV_PIX_FMT_GRAY8
,
AV_PIX_FMT_NONE
};
AVBufferSinkParams
*
buffersink_params
;
filter_graph
=
avfilter_graph_alloc
();
if
(
!
outputs
||
!
inputs
||
!
filter_graph
)
{
...
...
@@ -114,16 +113,20 @@ static int init_filters(const char *filters_descr)
}
/* buffer video sink: to terminate the filter chain. */
buffersink_params
=
av_buffersink_params_alloc
();
buffersink_params
->
pixel_fmts
=
pix_fmts
;
ret
=
avfilter_graph_create_filter
(
&
buffersink_ctx
,
buffersink
,
"out"
,
NULL
,
buffersink_params
,
filter_graph
);
av_free
(
buffersink_params
);
NULL
,
NULL
,
filter_graph
);
if
(
ret
<
0
)
{
av_log
(
NULL
,
AV_LOG_ERROR
,
"Cannot create buffer sink
\n
"
);
goto
end
;
}
ret
=
av_opt_set_int_list
(
buffersink_ctx
,
"pix_fmts"
,
pix_fmts
,
AV_PIX_FMT_NONE
,
AV_OPT_SEARCH_CHILDREN
);
if
(
ret
<
0
)
{
av_log
(
NULL
,
AV_LOG_ERROR
,
"Cannot set output pixel format
\n
"
);
goto
end
;
}
/* Endpoints for the filter graph. */
outputs
->
name
=
av_strdup
(
"in"
);
outputs
->
filter_ctx
=
buffersrc_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