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
6560625f
Commit
6560625f
authored
Jan 31, 2013
by
Nicolas George
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi/bufferqueue: add ff_bufqueue_is_full().
parent
dd87d4a3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
bufferqueue.h
libavfilter/bufferqueue.h
+9
-1
No files found.
libavfilter/bufferqueue.h
View file @
6560625f
...
...
@@ -54,6 +54,14 @@ struct FFBufQueue {
#define BUCKET(i) queue->queue[(queue->head + (i)) % FF_BUFQUEUE_SIZE]
/**
* Test if a buffer queue is full.
*/
static
inline
int
ff_bufqueue_is_full
(
struct
FFBufQueue
*
queue
)
{
return
queue
->
available
==
FF_BUFQUEUE_SIZE
;
}
/**
* Add a buffer to the queue.
*
...
...
@@ -63,7 +71,7 @@ struct FFBufQueue {
static
inline
void
ff_bufqueue_add
(
void
*
log
,
struct
FFBufQueue
*
queue
,
AVFilterBufferRef
*
buf
)
{
if
(
queue
->
available
==
FF_BUFQUEUE_SIZE
)
{
if
(
ff_bufqueue_is_full
(
queue
)
)
{
av_log
(
log
,
AV_LOG_WARNING
,
"Buffer queue overflow, dropping.
\n
"
);
avfilter_unref_buffer
(
BUCKET
(
--
queue
->
available
));
}
...
...
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