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
fcf8706e
Commit
fcf8706e
authored
Jun 28, 2012
by
Nicolas George
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sink_buffer: warn when there are too many buffers.
parent
05d6cc11
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
sink_buffer.c
libavfilter/sink_buffer.c
+10
-0
No files found.
libavfilter/sink_buffer.c
View file @
fcf8706e
...
...
@@ -56,6 +56,7 @@ AVABufferSinkParams *av_abuffersink_params_alloc(void)
typedef
struct
{
AVFifoBuffer
*
fifo
;
///< FIFO buffer of video frame references
unsigned
warning_limit
;
/* only used for video */
enum
PixelFormat
*
pixel_fmts
;
///< list of accepted pixel formats, must be terminated with -1
...
...
@@ -76,6 +77,7 @@ static av_cold int common_init(AVFilterContext *ctx)
av_log
(
ctx
,
AV_LOG_ERROR
,
"Failed to allocate fifo
\n
"
);
return
AVERROR
(
ENOMEM
);
}
buf
->
warning_limit
=
100
;
return
0
;
}
...
...
@@ -113,6 +115,14 @@ static void end_frame(AVFilterLink *inlink)
/* cache frame */
av_fifo_generic_write
(
buf
->
fifo
,
&
inlink
->
cur_buf
,
sizeof
(
AVFilterBufferRef
*
),
NULL
);
if
(
buf
->
warning_limit
&&
av_fifo_size
(
buf
->
fifo
)
/
sizeof
(
AVFilterBufferRef
*
)
>=
buf
->
warning_limit
)
{
av_log
(
ctx
,
AV_LOG_WARNING
,
"%d buffers queued in %s, something may be wrong.
\n
"
,
buf
->
warning_limit
,
(
char
*
)
av_x_if_null
(
ctx
->
name
,
ctx
->
filter
->
name
));
buf
->
warning_limit
*=
10
;
}
}
int
av_buffersink_get_buffer_ref
(
AVFilterContext
*
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