aboutsummaryrefslogtreecommitdiffstats
path: root/avconv_filter.c
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@flameeyes.eu>2012-09-05 07:03:56 +0000
committerDerek Buitenhuis <derek.buitenhuis@gmail.com>2012-10-01 17:17:42 -0400
commit5e3f9979fae32fe837dab6cff5bde7de3c387611 (patch)
tree0c7f80cc8a57a4d93c316ed961f330ed3282f19f /avconv_filter.c
parentbd680c7b49ba665467cb00664667928bbca516a9 (diff)
downloadffmpeg-5e3f9979fae32fe837dab6cff5bde7de3c387611.tar.gz
Use atexit() instead of defining a custom exit_program() interface.
Diffstat (limited to 'avconv_filter.c')
-rw-r--r--avconv_filter.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/avconv_filter.c b/avconv_filter.c
index ec38957cc1..f437c52001 100644
--- a/avconv_filter.c
+++ b/avconv_filter.c
@@ -46,7 +46,7 @@ static char *choose_ ## var ## s(OutputStream *ost) \
int len; \
\
if (avio_open_dyn_buf(&s) < 0) \
- exit_program(1); \
+ exit(1); \
\
for (p = ost->enc->supported_list; *p != none; p++) { \
get_name(*p); \
@@ -76,13 +76,13 @@ FilterGraph *init_simple_filtergraph(InputStream *ist, OutputStream *ost)
FilterGraph *fg = av_mallocz(sizeof(*fg));
if (!fg)
- exit_program(1);
+ exit(1);
fg->index = nb_filtergraphs;
fg->outputs = grow_array(fg->outputs, sizeof(*fg->outputs), &fg->nb_outputs,
fg->nb_outputs + 1);
if (!(fg->outputs[0] = av_mallocz(sizeof(*fg->outputs[0]))))
- exit_program(1);
+ exit(1);
fg->outputs[0]->ost = ost;
fg->outputs[0]->graph = fg;
@@ -91,7 +91,7 @@ FilterGraph *init_simple_filtergraph(InputStream *ist, OutputStream *ost)
fg->inputs = grow_array(fg->inputs, sizeof(*fg->inputs), &fg->nb_inputs,
fg->nb_inputs + 1);
if (!(fg->inputs[0] = av_mallocz(sizeof(*fg->inputs[0]))))
- exit_program(1);
+ exit(1);
fg->inputs[0]->ist = ist;
fg->inputs[0]->graph = fg;
@@ -116,7 +116,7 @@ static void init_input_filter(FilterGraph *fg, AVFilterInOut *in)
if (type != AVMEDIA_TYPE_VIDEO && type != AVMEDIA_TYPE_AUDIO) {
av_log(NULL, AV_LOG_FATAL, "Only video and audio filters supported "
"currently.\n");
- exit_program(1);
+ exit(1);
}
if (in->name) {
@@ -128,7 +128,7 @@ static void init_input_filter(FilterGraph *fg, AVFilterInOut *in)
if (file_idx < 0 || file_idx >= nb_input_files) {
av_log(NULL, AV_LOG_FATAL, "Invalid file index %d in filtegraph description %s.\n",
file_idx, fg->graph_desc);
- exit_program(1);
+ exit(1);
}
s = input_files[file_idx]->ctx;
@@ -143,7 +143,7 @@ static void init_input_filter(FilterGraph *fg, AVFilterInOut *in)
if (!st) {
av_log(NULL, AV_LOG_FATAL, "Stream specifier '%s' in filtergraph description %s "
"matches no streams.\n", p, fg->graph_desc);
- exit_program(1);
+ exit(1);
}
ist = input_streams[input_files[file_idx]->ist_index + st->index];
} else {
@@ -157,7 +157,7 @@ static void init_input_filter(FilterGraph *fg, AVFilterInOut *in)
av_log(NULL, AV_LOG_FATAL, "Cannot find a matching stream for "
"unlabeled input pad %d on filter %s", in->pad_idx,
in->filter_ctx->name);
- exit_program(1);
+ exit(1);
}
}
av_assert0(ist);
@@ -169,7 +169,7 @@ static void init_input_filter(FilterGraph *fg, AVFilterInOut *in)
fg->inputs = grow_array(fg->inputs, sizeof(*fg->inputs),
&fg->nb_inputs, fg->nb_inputs + 1);
if (!(fg->inputs[fg->nb_inputs - 1] = av_mallocz(sizeof(*fg->inputs[0]))))
- exit_program(1);
+ exit(1);
fg->inputs[fg->nb_inputs - 1]->ist = ist;
fg->inputs[fg->nb_inputs - 1]->graph = fg;
@@ -332,7 +332,7 @@ static int configure_output_audio_filter(FilterGraph *fg, OutputFilter *ofilter,
AVIOContext *pb; \
\
if (avio_open_dyn_buf(&pb) < 0) \
- exit_program(1); \
+ exit(1); \
\
avio_printf(pb, "%s", ctx->filter->name); \
if (nb_pads > 1) \
@@ -524,7 +524,7 @@ int configure_filtergraph(FilterGraph *fg)
fg->outputs = grow_array(fg->outputs, sizeof(*fg->outputs),
&fg->nb_outputs, fg->nb_outputs + 1);
if (!(fg->outputs[fg->nb_outputs - 1] = av_mallocz(sizeof(*fg->outputs[0]))))
- exit_program(1);
+ exit(1);
fg->outputs[fg->nb_outputs - 1]->graph = fg;
fg->outputs[fg->nb_outputs - 1]->out_tmp = cur;
cur = cur->next;