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
5ba2aef6
Commit
5ba2aef6
authored
Apr 03, 2017
by
Nicolas George
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi/buffersrc: add av_buffersrc_close().
parent
36c111c4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
11 deletions
+24
-11
APIchanges
doc/APIchanges
+3
-0
buffersrc.c
libavfilter/buffersrc.c
+12
-10
buffersrc.h
libavfilter/buffersrc.h
+8
-0
version.h
libavfilter/version.h
+1
-1
No files found.
doc/APIchanges
View file @
5ba2aef6
...
...
@@ -15,6 +15,9 @@ libavutil: 2015-08-28
API changes, most recent first:
2017-09-08 - xxxxxxx - lavfi 6.103.100 - buffersrc.h
Add av_buffersrc_close().
2017-09-04 - xxxxxxx - lavc 57.105.100 - avcodec.h
Add AV_HWACCEL_CODEC_CAP_EXPERIMENTAL, replacing the deprecated
HWACCEL_CODEC_CAP_EXPERIMENTAL flag.
...
...
libavfilter/buffersrc.c
View file @
5ba2aef6
...
...
@@ -196,16 +196,9 @@ static int av_buffersrc_add_frame_internal(AVFilterContext *ctx,
s
->
nb_failed_requests
=
0
;
if
(
!
frame
)
{
s
->
eof
=
1
;
ff_avfilter_link_set_in_status
(
ctx
->
outputs
[
0
],
AVERROR_EOF
,
AV_NOPTS_VALUE
);
if
((
flags
&
AV_BUFFERSRC_FLAG_PUSH
))
{
ret
=
push_frame
(
ctx
->
graph
);
if
(
ret
<
0
)
return
ret
;
}
return
0
;
}
else
if
(
s
->
eof
)
if
(
!
frame
)
return
av_buffersrc_close
(
ctx
,
AV_NOPTS_VALUE
,
flags
);
if
(
s
->
eof
)
return
AVERROR
(
EINVAL
);
refcounted
=
!!
frame
->
buf
[
0
];
...
...
@@ -267,6 +260,15 @@ static int av_buffersrc_add_frame_internal(AVFilterContext *ctx,
return
0
;
}
int
av_buffersrc_close
(
AVFilterContext
*
ctx
,
int64_t
pts
,
unsigned
flags
)
{
BufferSourceContext
*
s
=
ctx
->
priv
;
s
->
eof
=
1
;
ff_avfilter_link_set_in_status
(
ctx
->
outputs
[
0
],
AVERROR_EOF
,
pts
);
return
(
flags
&
AV_BUFFERSRC_FLAG_PUSH
)
?
push_frame
(
ctx
->
graph
)
:
0
;
}
static
av_cold
int
init_video
(
AVFilterContext
*
ctx
)
{
BufferSourceContext
*
c
=
ctx
->
priv
;
...
...
libavfilter/buffersrc.h
View file @
5ba2aef6
...
...
@@ -193,6 +193,14 @@ av_warn_unused_result
int
av_buffersrc_add_frame_flags
(
AVFilterContext
*
buffer_src
,
AVFrame
*
frame
,
int
flags
);
/**
* Close the buffer source after EOF.
*
* This is similar to passing NULL to av_buffersrc_add_frame_flags()
* except it takes the timestamp of the EOF, i.e. the timestamp of the end
* of the last frame.
*/
int
av_buffersrc_close
(
AVFilterContext
*
ctx
,
int64_t
pts
,
unsigned
flags
);
/**
* @}
...
...
libavfilter/version.h
View file @
5ba2aef6
...
...
@@ -30,7 +30,7 @@
#include "libavutil/version.h"
#define LIBAVFILTER_VERSION_MAJOR 6
#define LIBAVFILTER_VERSION_MINOR 10
2
#define LIBAVFILTER_VERSION_MINOR 10
3
#define LIBAVFILTER_VERSION_MICRO 100
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
...
...
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