Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libremedia
Tethys
FFmpeg
Commits
95c76e11
Commit
95c76e11
authored
17 years ago
by
Benoit Fouet
Browse files
Options
Downloads
Patches
Plain Diff
cosmetics (by Björn Axelsson)
Originally committed as revision 12774 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
49cec199
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
libavutil/fifo.c
+4
-4
4 additions, 4 deletions
libavutil/fifo.c
libavutil/fifo.h
+4
-4
4 additions, 4 deletions
libavutil/fifo.h
with
8 additions
and
8 deletions
libavutil/fifo.c
+
4
−
4
View file @
95c76e11
...
@@ -76,17 +76,17 @@ void av_fifo_write(AVFifoBuffer *f, const uint8_t *buf, int size)
...
@@ -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
);
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
;
int
total
=
size
;
do
{
do
{
int
len
=
FFMIN
(
f
->
end
-
f
->
wptr
,
size
);
int
len
=
FFMIN
(
f
->
end
-
f
->
wptr
,
size
);
if
(
func
)
{
if
(
func
)
{
if
(
func
(
buf
,
f
->
wptr
,
len
)
<=
0
)
if
(
func
(
src
,
f
->
wptr
,
len
)
<=
0
)
break
;
break
;
}
else
{
}
else
{
memcpy
(
f
->
wptr
,
buf
,
len
);
memcpy
(
f
->
wptr
,
src
,
len
);
buf
=
(
uint8_t
*
)
buf
+
len
;
src
=
(
uint8_t
*
)
src
+
len
;
}
}
f
->
wptr
+=
len
;
f
->
wptr
+=
len
;
if
(
f
->
wptr
>=
f
->
end
)
if
(
f
->
wptr
>=
f
->
end
)
...
...
This diff is collapsed.
Click to expand it.
libavutil/fifo.h
+
4
−
4
View file @
95c76e11
...
@@ -81,16 +81,16 @@ attribute_deprecated void av_fifo_write(AVFifoBuffer *f, const uint8_t *buf, int
...
@@ -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.
* Feeds data from a user supplied callback to an AVFifoBuffer.
* @param *f AVFifoBuffer to write to
* @param *f AVFifoBuffer to write to
* @param *
buf
data source
* @param *
src
data source
* @param size number of bytes to write
* @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.
* second is dest_buf, third is dest_buf_size.
* func must return the number of bytes written to dest_buf, or <= 0 to
* func must return the number of bytes written to dest_buf, or <= 0 to
* indicate no more data available to write.
* 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.
* @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.
* Resizes an AVFifoBuffer.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment