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
765d4f3b
Commit
765d4f3b
authored
18 years ago
by
Michael Niedermayer
Browse files
Options
Downloads
Patches
Plain Diff
remove near duplicate function
Originally committed as revision 7570 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
870a12d1
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libavutil/fifo.c
+6
-15
6 additions, 15 deletions
libavutil/fifo.c
with
6 additions
and
15 deletions
libavutil/fifo.c
+
6
−
15
View file @
765d4f3b
...
@@ -50,20 +50,7 @@ int av_fifo_size(AVFifoBuffer *f)
...
@@ -50,20 +50,7 @@ int av_fifo_size(AVFifoBuffer *f)
*/
*/
int
av_fifo_read
(
AVFifoBuffer
*
f
,
uint8_t
*
buf
,
int
buf_size
)
int
av_fifo_read
(
AVFifoBuffer
*
f
,
uint8_t
*
buf
,
int
buf_size
)
{
{
int
size
=
av_fifo_size
(
f
);
return
av_fifo_generic_read
(
f
,
buf_size
,
NULL
,
buf
);
if
(
size
<
buf_size
)
return
-
1
;
while
(
buf_size
>
0
)
{
int
len
=
FFMIN
(
f
->
end
-
f
->
rptr
,
buf_size
);
memcpy
(
buf
,
f
->
rptr
,
len
);
buf
+=
len
;
f
->
rptr
+=
len
;
if
(
f
->
rptr
>=
f
->
end
)
f
->
rptr
=
f
->
buffer
;
buf_size
-=
len
;
}
return
0
;
}
}
/**
/**
...
@@ -111,7 +98,11 @@ int av_fifo_generic_read(AVFifoBuffer *f, int buf_size, void (*func)(void*, void
...
@@ -111,7 +98,11 @@ int av_fifo_generic_read(AVFifoBuffer *f, int buf_size, void (*func)(void*, void
return
-
1
;
return
-
1
;
while
(
buf_size
>
0
)
{
while
(
buf_size
>
0
)
{
int
len
=
FFMIN
(
f
->
end
-
f
->
rptr
,
buf_size
);
int
len
=
FFMIN
(
f
->
end
-
f
->
rptr
,
buf_size
);
func
(
dest
,
f
->
rptr
,
len
);
if
(
func
)
func
(
dest
,
f
->
rptr
,
len
);
else
{
memcpy
(
dest
,
f
->
rptr
,
len
);
dest
=
(
uint8_t
*
)
dest
+
len
;
}
f
->
rptr
+=
len
;
f
->
rptr
+=
len
;
if
(
f
->
rptr
>=
f
->
end
)
if
(
f
->
rptr
>=
f
->
end
)
f
->
rptr
=
f
->
buffer
;
f
->
rptr
=
f
->
buffer
;
...
...
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