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
95c76e11
Commit
95c76e11
authored
Apr 09, 2008
by
Benoit Fouet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cosmetics (by Björn Axelsson)
Originally committed as revision 12774 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
49cec199
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
fifo.c
libavutil/fifo.c
+4
-4
fifo.h
libavutil/fifo.h
+4
-4
No files found.
libavutil/fifo.c
View file @
95c76e11
...
...
@@ -76,17 +76,17 @@ void av_fifo_write(AVFifoBuffer *f, const uint8_t *buf, int size)
av_fifo_generic_write
(
f
,
(
void
*
)
buf
,
size
,
NULL
);
}
int
av_fifo_generic_write
(
AVFifoBuffer
*
f
,
void
*
buf
,
int
size
,
int
(
*
func
)(
void
*
,
void
*
,
int
))
int
av_fifo_generic_write
(
AVFifoBuffer
*
f
,
void
*
src
,
int
size
,
int
(
*
func
)(
void
*
,
void
*
,
int
))
{
int
total
=
size
;
do
{
int
len
=
FFMIN
(
f
->
end
-
f
->
wptr
,
size
);
if
(
func
)
{
if
(
func
(
buf
,
f
->
wptr
,
len
)
<=
0
)
if
(
func
(
src
,
f
->
wptr
,
len
)
<=
0
)
break
;
}
else
{
memcpy
(
f
->
wptr
,
buf
,
len
);
buf
=
(
uint8_t
*
)
buf
+
len
;
memcpy
(
f
->
wptr
,
src
,
len
);
src
=
(
uint8_t
*
)
src
+
len
;
}
f
->
wptr
+=
len
;
if
(
f
->
wptr
>=
f
->
end
)
...
...
libavutil/fifo.h
View file @
95c76e11
...
...
@@ -81,16 +81,16 @@ attribute_deprecated void av_fifo_write(AVFifoBuffer *f, const uint8_t *buf, int
/**
* Feeds data from a user supplied callback to an AVFifoBuffer.
* @param *f AVFifoBuffer to write to
* @param *
buf
data source
* @param *
src
data source
* @param size number of bytes to write
* @param *func generic write function. First parameter is
buf
,
* @param *func generic write function. First parameter is
src
,
* second is dest_buf, third is dest_buf_size.
* func must return the number of bytes written to dest_buf, or <= 0 to
* indicate no more data available to write.
* If func is NULL,
buf
is interpreted as a simple byte array for source data.
* If func is NULL,
src
is interpreted as a simple byte array for source data.
* @return the number of bytes written to the fifo.
*/
int
av_fifo_generic_write
(
AVFifoBuffer
*
f
,
void
*
buf
,
int
size
,
int
(
*
func
)(
void
*
,
void
*
,
int
));
int
av_fifo_generic_write
(
AVFifoBuffer
*
f
,
void
*
src
,
int
size
,
int
(
*
func
)(
void
*
,
void
*
,
int
));
/**
* Resizes an AVFifoBuffer.
...
...
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