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
9a5d6c23
Commit
9a5d6c23
authored
Sep 21, 2011
by
Diego Biurrun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tests/tools/examples: Replace direct exit() calls by return.
parent
be0675ce
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
19 additions
and
25 deletions
+19
-25
fft-test.c
libavcodec/fft-test.c
+1
-4
motion-test.c
libavcodec/motion-test.c
+1
-3
output-example.c
libavformat/output-example.c
+5
-5
seek-test.c
libavformat/seek-test.c
+3
-4
cws2fws.c
tools/cws2fws.c
+9
-9
No files found.
libavcodec/fft-test.c
View file @
9a5d6c23
...
...
@@ -37,8 +37,6 @@
#include <stdlib.h>
#include <string.h>
#undef exit
/* reference fft */
#define MUL16(a,b) ((a) * (b))
...
...
@@ -228,7 +226,6 @@ static void help(void)
"-n b set the transform size to 2^b
\n
"
"-f x set scale factor for output data of (I)MDCT to x
\n
"
);
exit
(
1
);
}
enum
tf_transform
{
...
...
@@ -267,7 +264,7 @@ int main(int argc, char **argv)
switch
(
c
)
{
case
'h'
:
help
();
break
;
return
1
;
case
's'
:
do_speed
=
1
;
break
;
...
...
libavcodec/motion-test.c
View file @
9a5d6c23
...
...
@@ -33,7 +33,6 @@
#include "dsputil.h"
#include "libavutil/lfg.h"
#undef exit
#undef printf
#define WIDTH 64
...
...
@@ -61,7 +60,6 @@ static void help(void)
{
printf
(
"motion-test [-h]
\n
"
"test motion implementations
\n
"
);
exit
(
1
);
}
static
int64_t
gettime
(
void
)
...
...
@@ -138,7 +136,7 @@ int main(int argc, char **argv)
switch
(
c
)
{
case
'h'
:
help
();
break
;
return
1
;
}
}
...
...
libavformat/output-example.c
View file @
9a5d6c23
...
...
@@ -445,7 +445,7 @@ int main(int argc, char **argv)
"The output format is automatically guessed according to the file extension.
\n
"
"Raw images can also be output by using '%%d' in the filename
\n
"
"
\n
"
,
argv
[
0
]);
exit
(
1
)
;
return
1
;
}
filename
=
argv
[
1
];
...
...
@@ -459,14 +459,14 @@ int main(int argc, char **argv)
}
if
(
!
fmt
)
{
fprintf
(
stderr
,
"Could not find suitable output format
\n
"
);
exit
(
1
)
;
return
1
;
}
/* allocate the output media context */
oc
=
avformat_alloc_context
();
if
(
!
oc
)
{
fprintf
(
stderr
,
"Memory error
\n
"
);
exit
(
1
)
;
return
1
;
}
oc
->
oformat
=
fmt
;
snprintf
(
oc
->
filename
,
sizeof
(
oc
->
filename
),
"%s"
,
filename
);
...
...
@@ -486,7 +486,7 @@ int main(int argc, char **argv)
parameters). */
if
(
av_set_parameters
(
oc
,
NULL
)
<
0
)
{
fprintf
(
stderr
,
"Invalid output format parameters
\n
"
);
exit
(
1
)
;
return
1
;
}
av_dump_format
(
oc
,
0
,
filename
,
1
);
...
...
@@ -502,7 +502,7 @@ int main(int argc, char **argv)
if
(
!
(
fmt
->
flags
&
AVFMT_NOFILE
))
{
if
(
avio_open
(
&
oc
->
pb
,
filename
,
AVIO_FLAG_WRITE
)
<
0
)
{
fprintf
(
stderr
,
"Could not open '%s'
\n
"
,
filename
);
exit
(
1
)
;
return
1
;
}
}
...
...
libavformat/seek-test.c
View file @
9a5d6c23
...
...
@@ -28,7 +28,6 @@
#include "libavutil/mathematics.h"
#include "libavformat/avformat.h"
#undef exit
#undef printf
#undef fprintf
...
...
@@ -75,7 +74,7 @@ int main(int argc, char **argv)
if
(
argc
!=
2
)
{
printf
(
"usage: %s input_file
\n
"
"
\n
"
,
argv
[
0
]);
exit
(
1
)
;
return
1
;
}
filename
=
argv
[
1
];
...
...
@@ -84,13 +83,13 @@ int main(int argc, char **argv)
av_dict_free
(
&
format_opts
);
if
(
ret
<
0
)
{
fprintf
(
stderr
,
"cannot open %s
\n
"
,
filename
);
exit
(
1
)
;
return
1
;
}
ret
=
avformat_find_stream_info
(
ic
,
NULL
);
if
(
ret
<
0
)
{
fprintf
(
stderr
,
"%s: could not find codec parameters
\n
"
,
filename
);
exit
(
1
)
;
return
1
;
}
for
(
i
=
0
;
;
i
++
){
...
...
tools/cws2fws.c
View file @
9a5d6c23
...
...
@@ -29,14 +29,14 @@ int main(int argc, char *argv[])
if
(
argc
<
3
)
{
printf
(
"Usage: %s <infile.swf> <outfile.swf>
\n
"
,
argv
[
0
]);
exit
(
1
)
;
return
1
;
}
fd_in
=
open
(
argv
[
1
],
O_RDONLY
);
if
(
fd_in
<
0
)
{
perror
(
"Error opening input file"
);
exit
(
1
)
;
return
1
;
}
fd_out
=
open
(
argv
[
2
],
O_WRONLY
|
O_CREAT
,
00644
);
...
...
@@ -44,7 +44,7 @@ int main(int argc, char *argv[])
{
perror
(
"Error opening output file"
);
close
(
fd_in
);
exit
(
1
)
;
return
1
;
}
if
(
read
(
fd_in
,
&
buf_in
,
8
)
!=
8
)
...
...
@@ -52,13 +52,13 @@ int main(int argc, char *argv[])
printf
(
"Header error
\n
"
);
close
(
fd_in
);
close
(
fd_out
);
exit
(
1
)
;
return
1
;
}
if
(
buf_in
[
0
]
!=
'C'
||
buf_in
[
1
]
!=
'W'
||
buf_in
[
2
]
!=
'S'
)
{
printf
(
"Not a compressed flash file
\n
"
);
exit
(
1
)
;
return
1
;
}
fstat
(
fd_in
,
&
statbuf
);
...
...
@@ -71,7 +71,7 @@ int main(int argc, char *argv[])
buf_in
[
0
]
=
'F'
;
if
(
write
(
fd_out
,
&
buf_in
,
8
)
<
8
)
{
perror
(
"Error writing output file"
);
exit
(
1
)
;
return
1
;
}
zstream
.
zalloc
=
NULL
;
...
...
@@ -97,7 +97,7 @@ int main(int argc, char *argv[])
{
printf
(
"Error while decompressing: %d
\n
"
,
ret
);
inflateEnd
(
&
zstream
);
exit
(
1
)
;
return
1
;
}
dbgprintf
(
"a_in: %d t_in: %lu a_out: %d t_out: %lu -- %lu out
\n
"
,
...
...
@@ -106,7 +106,7 @@ int main(int argc, char *argv[])
if
(
write
(
fd_out
,
&
buf_out
,
zstream
.
total_out
-
last_out
)
<
zstream
.
total_out
-
last_out
)
{
perror
(
"Error writing output file"
);
exit
(
1
)
;
return
1
;
}
i
+=
len
;
...
...
@@ -128,7 +128,7 @@ int main(int argc, char *argv[])
lseek
(
fd_out
,
4
,
SEEK_SET
);
if
(
write
(
fd_out
,
&
buf_in
,
4
)
<
4
)
{
perror
(
"Error writing output file"
);
exit
(
1
)
;
return
1
;
}
}
...
...
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