aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/output-example.c
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2011-09-21 18:46:56 +0200
committerDiego Biurrun <diego@biurrun.de>2011-12-08 01:00:58 +0100
commit9a5d6c23c5cc25b887f996d55f96dfbacf760e88 (patch)
tree78a4bad898880ef2a740306908204a008980a581 /libavformat/output-example.c
parentbe0675ce672b7788b0f1277704be663f415d6498 (diff)
downloadffmpeg-9a5d6c23c5cc25b887f996d55f96dfbacf760e88.tar.gz
tests/tools/examples: Replace direct exit() calls by return.
Diffstat (limited to 'libavformat/output-example.c')
-rw-r--r--libavformat/output-example.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libavformat/output-example.c b/libavformat/output-example.c
index 95690f75de..809e236674 100644
--- a/libavformat/output-example.c
+++ b/libavformat/output-example.c
@@ -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;
}
}