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
870a12d1
Commit
870a12d1
authored
Jan 17, 2007
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
simplify
Originally committed as revision 7569 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
f81b99b8
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
8 deletions
+3
-8
fifo.c
libavutil/fifo.c
+3
-8
No files found.
libavutil/fifo.c
View file @
870a12d1
...
...
@@ -90,10 +90,8 @@ void av_fifo_realloc(AVFifoBuffer *f, unsigned int new_size) {
void
av_fifo_write
(
AVFifoBuffer
*
f
,
const
uint8_t
*
buf
,
int
size
)
{
int
len
;
while
(
size
>
0
)
{
len
=
FFMIN
(
f
->
end
-
f
->
wptr
,
size
);
int
len
=
FFMIN
(
f
->
end
-
f
->
wptr
,
size
);
memcpy
(
f
->
wptr
,
buf
,
len
);
f
->
wptr
+=
len
;
if
(
f
->
wptr
>=
f
->
end
)
...
...
@@ -107,15 +105,12 @@ void av_fifo_write(AVFifoBuffer *f, const uint8_t *buf, int size)
/* get data from the fifo (return -1 if not enough data) */
int
av_fifo_generic_read
(
AVFifoBuffer
*
f
,
int
buf_size
,
void
(
*
func
)(
void
*
,
void
*
,
int
),
void
*
dest
)
{
int
len
;
int
size
=
f
->
wptr
-
f
->
rptr
;
if
(
size
<
0
)
size
+=
f
->
end
-
f
->
buffer
;
int
size
=
av_fifo_size
(
f
);
if
(
size
<
buf_size
)
return
-
1
;
while
(
buf_size
>
0
)
{
len
=
FFMIN
(
f
->
end
-
f
->
rptr
,
buf_size
);
int
len
=
FFMIN
(
f
->
end
-
f
->
rptr
,
buf_size
);
func
(
dest
,
f
->
rptr
,
len
);
f
->
rptr
+=
len
;
if
(
f
->
rptr
>=
f
->
end
)
...
...
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