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
c36302a7
Commit
c36302a7
authored
Dec 26, 2012
by
Nicolas George
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi/sink_buffer: switch to filter_frame.
parent
a978c04e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
12 deletions
+4
-12
sink_buffer.c
libavfilter/sink_buffer.c
+4
-12
No files found.
libavfilter/sink_buffer.c
View file @
c36302a7
...
@@ -117,16 +117,14 @@ static int add_buffer_ref(AVFilterContext *ctx, AVFilterBufferRef *ref)
...
@@ -117,16 +117,14 @@ static int add_buffer_ref(AVFilterContext *ctx, AVFilterBufferRef *ref)
return
0
;
return
0
;
}
}
static
int
end_frame
(
AVFilterLink
*
inlink
)
static
int
filter_frame
(
AVFilterLink
*
inlink
,
AVFilterBufferRef
*
ref
)
{
{
AVFilterContext
*
ctx
=
inlink
->
dst
;
AVFilterContext
*
ctx
=
inlink
->
dst
;
BufferSinkContext
*
buf
=
inlink
->
dst
->
priv
;
BufferSinkContext
*
buf
=
inlink
->
dst
->
priv
;
int
ret
;
int
ret
;
av_assert1
(
inlink
->
cur_buf
);
if
((
ret
=
add_buffer_ref
(
ctx
,
ref
))
<
0
)
if
((
ret
=
add_buffer_ref
(
ctx
,
inlink
->
cur_buf
))
<
0
)
return
ret
;
return
ret
;
inlink
->
cur_buf
=
NULL
;
if
(
buf
->
warning_limit
&&
if
(
buf
->
warning_limit
&&
av_fifo_size
(
buf
->
fifo
)
/
sizeof
(
AVFilterBufferRef
*
)
>=
buf
->
warning_limit
)
{
av_fifo_size
(
buf
->
fifo
)
/
sizeof
(
AVFilterBufferRef
*
)
>=
buf
->
warning_limit
)
{
av_log
(
ctx
,
AV_LOG_WARNING
,
av_log
(
ctx
,
AV_LOG_WARNING
,
...
@@ -238,7 +236,7 @@ static const AVFilterPad ffbuffersink_inputs[] = {
...
@@ -238,7 +236,7 @@ static const AVFilterPad ffbuffersink_inputs[] = {
{
{
.
name
=
"default"
,
.
name
=
"default"
,
.
type
=
AVMEDIA_TYPE_VIDEO
,
.
type
=
AVMEDIA_TYPE_VIDEO
,
.
end_frame
=
end
_frame
,
.
filter_frame
=
filter
_frame
,
.
min_perms
=
AV_PERM_READ
|
AV_PERM_PRESERVE
,
.
min_perms
=
AV_PERM_READ
|
AV_PERM_PRESERVE
,
},
},
{
NULL
},
{
NULL
},
...
@@ -260,7 +258,7 @@ static const AVFilterPad buffersink_inputs[] = {
...
@@ -260,7 +258,7 @@ static const AVFilterPad buffersink_inputs[] = {
{
{
.
name
=
"default"
,
.
name
=
"default"
,
.
type
=
AVMEDIA_TYPE_VIDEO
,
.
type
=
AVMEDIA_TYPE_VIDEO
,
.
end_frame
=
end
_frame
,
.
filter_frame
=
filter
_frame
,
.
min_perms
=
AV_PERM_READ
|
AV_PERM_PRESERVE
,
.
min_perms
=
AV_PERM_READ
|
AV_PERM_PRESERVE
,
},
},
{
NULL
},
{
NULL
},
...
@@ -278,12 +276,6 @@ AVFilter avfilter_vsink_buffersink = {
...
@@ -278,12 +276,6 @@ AVFilter avfilter_vsink_buffersink = {
.
outputs
=
NULL
,
.
outputs
=
NULL
,
};
};
static
int
filter_frame
(
AVFilterLink
*
link
,
AVFilterBufferRef
*
samplesref
)
{
end_frame
(
link
);
return
0
;
}
static
av_cold
int
asink_init
(
AVFilterContext
*
ctx
,
const
char
*
args
,
void
*
opaque
)
static
av_cold
int
asink_init
(
AVFilterContext
*
ctx
,
const
char
*
args
,
void
*
opaque
)
{
{
BufferSinkContext
*
buf
=
ctx
->
priv
;
BufferSinkContext
*
buf
=
ctx
->
priv
;
...
...
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