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
e76c0c6a
Commit
e76c0c6a
authored
Mar 29, 2011
by
Reimar Döffinger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify: Use FFMIN.
parent
621f4c98
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
6 deletions
+2
-6
oss_audio.c
libavdevice/oss_audio.c
+1
-3
sndio_enc.c
libavdevice/sndio_enc.c
+1
-3
No files found.
libavdevice/oss_audio.c
View file @
e76c0c6a
...
...
@@ -179,9 +179,7 @@ static int audio_write_packet(AVFormatContext *s1, AVPacket *pkt)
uint8_t
*
buf
=
pkt
->
data
;
while
(
size
>
0
)
{
len
=
AUDIO_BLOCK_SIZE
-
s
->
buffer_ptr
;
if
(
len
>
size
)
len
=
size
;
len
=
FFMIN
(
AUDIO_BLOCK_SIZE
-
s
->
buffer_ptr
,
size
);
memcpy
(
s
->
buffer
+
s
->
buffer_ptr
,
buf
,
len
);
s
->
buffer_ptr
+=
len
;
if
(
s
->
buffer_ptr
>=
AUDIO_BLOCK_SIZE
)
{
...
...
libavdevice/sndio_enc.c
View file @
e76c0c6a
...
...
@@ -49,9 +49,7 @@ static int audio_write_packet(AVFormatContext *s1, AVPacket *pkt)
int
len
,
ret
;
while
(
size
>
0
)
{
len
=
s
->
buffer_size
-
s
->
buffer_offset
;
if
(
len
>
size
)
len
=
size
;
len
=
FFMIN
(
s
->
buffer_size
-
s
->
buffer_offset
,
size
);
memcpy
(
s
->
buffer
+
s
->
buffer_offset
,
buf
,
len
);
buf
+=
len
;
size
-=
len
;
...
...
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