mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
ffmpeg_filter: replace exit() by exit_program()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
44d0e520f8
commit
efce76a80d
@ -109,7 +109,7 @@ static char *choose_pix_fmts(OutputStream *ost)
|
|||||||
int len;
|
int len;
|
||||||
|
|
||||||
if (avio_open_dyn_buf(&s) < 0)
|
if (avio_open_dyn_buf(&s) < 0)
|
||||||
exit(1);
|
exit_program(1);
|
||||||
|
|
||||||
p = ost->enc->pix_fmts;
|
p = ost->enc->pix_fmts;
|
||||||
if (ost->st->codec->strict_std_compliance <= FF_COMPLIANCE_UNOFFICIAL) {
|
if (ost->st->codec->strict_std_compliance <= FF_COMPLIANCE_UNOFFICIAL) {
|
||||||
@ -147,7 +147,7 @@ static char *choose_ ## var ## s(OutputStream *ost) \
|
|||||||
int len; \
|
int len; \
|
||||||
\
|
\
|
||||||
if (avio_open_dyn_buf(&s) < 0) \
|
if (avio_open_dyn_buf(&s) < 0) \
|
||||||
exit(1); \
|
exit_program(1); \
|
||||||
\
|
\
|
||||||
for (p = ost->enc->supported_list; *p != none; p++) { \
|
for (p = ost->enc->supported_list; *p != none; p++) { \
|
||||||
get_name(*p); \
|
get_name(*p); \
|
||||||
@ -177,12 +177,12 @@ FilterGraph *init_simple_filtergraph(InputStream *ist, OutputStream *ost)
|
|||||||
FilterGraph *fg = av_mallocz(sizeof(*fg));
|
FilterGraph *fg = av_mallocz(sizeof(*fg));
|
||||||
|
|
||||||
if (!fg)
|
if (!fg)
|
||||||
exit(1);
|
exit_program(1);
|
||||||
fg->index = nb_filtergraphs;
|
fg->index = nb_filtergraphs;
|
||||||
|
|
||||||
GROW_ARRAY(fg->outputs, fg->nb_outputs);
|
GROW_ARRAY(fg->outputs, fg->nb_outputs);
|
||||||
if (!(fg->outputs[0] = av_mallocz(sizeof(*fg->outputs[0]))))
|
if (!(fg->outputs[0] = av_mallocz(sizeof(*fg->outputs[0]))))
|
||||||
exit(1);
|
exit_program(1);
|
||||||
fg->outputs[0]->ost = ost;
|
fg->outputs[0]->ost = ost;
|
||||||
fg->outputs[0]->graph = fg;
|
fg->outputs[0]->graph = fg;
|
||||||
|
|
||||||
@ -190,7 +190,7 @@ FilterGraph *init_simple_filtergraph(InputStream *ist, OutputStream *ost)
|
|||||||
|
|
||||||
GROW_ARRAY(fg->inputs, fg->nb_inputs);
|
GROW_ARRAY(fg->inputs, fg->nb_inputs);
|
||||||
if (!(fg->inputs[0] = av_mallocz(sizeof(*fg->inputs[0]))))
|
if (!(fg->inputs[0] = av_mallocz(sizeof(*fg->inputs[0]))))
|
||||||
exit(1);
|
exit_program(1);
|
||||||
fg->inputs[0]->ist = ist;
|
fg->inputs[0]->ist = ist;
|
||||||
fg->inputs[0]->graph = fg;
|
fg->inputs[0]->graph = fg;
|
||||||
|
|
||||||
@ -213,7 +213,7 @@ static void init_input_filter(FilterGraph *fg, AVFilterInOut *in)
|
|||||||
if (type != AVMEDIA_TYPE_VIDEO && type != AVMEDIA_TYPE_AUDIO) {
|
if (type != AVMEDIA_TYPE_VIDEO && type != AVMEDIA_TYPE_AUDIO) {
|
||||||
av_log(NULL, AV_LOG_FATAL, "Only video and audio filters supported "
|
av_log(NULL, AV_LOG_FATAL, "Only video and audio filters supported "
|
||||||
"currently.\n");
|
"currently.\n");
|
||||||
exit(1);
|
exit_program(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (in->name) {
|
if (in->name) {
|
||||||
@ -225,7 +225,7 @@ static void init_input_filter(FilterGraph *fg, AVFilterInOut *in)
|
|||||||
if (file_idx < 0 || file_idx >= nb_input_files) {
|
if (file_idx < 0 || file_idx >= nb_input_files) {
|
||||||
av_log(NULL, AV_LOG_FATAL, "Invalid file index %d in filtergraph description %s.\n",
|
av_log(NULL, AV_LOG_FATAL, "Invalid file index %d in filtergraph description %s.\n",
|
||||||
file_idx, fg->graph_desc);
|
file_idx, fg->graph_desc);
|
||||||
exit(1);
|
exit_program(1);
|
||||||
}
|
}
|
||||||
s = input_files[file_idx]->ctx;
|
s = input_files[file_idx]->ctx;
|
||||||
|
|
||||||
@ -243,7 +243,7 @@ static void init_input_filter(FilterGraph *fg, AVFilterInOut *in)
|
|||||||
if (!st) {
|
if (!st) {
|
||||||
av_log(NULL, AV_LOG_FATAL, "Stream specifier '%s' in filtergraph description %s "
|
av_log(NULL, AV_LOG_FATAL, "Stream specifier '%s' in filtergraph description %s "
|
||||||
"matches no streams.\n", p, fg->graph_desc);
|
"matches no streams.\n", p, fg->graph_desc);
|
||||||
exit(1);
|
exit_program(1);
|
||||||
}
|
}
|
||||||
ist = input_streams[input_files[file_idx]->ist_index + st->index];
|
ist = input_streams[input_files[file_idx]->ist_index + st->index];
|
||||||
} else {
|
} else {
|
||||||
@ -257,7 +257,7 @@ static void init_input_filter(FilterGraph *fg, AVFilterInOut *in)
|
|||||||
av_log(NULL, AV_LOG_FATAL, "Cannot find a matching stream for "
|
av_log(NULL, AV_LOG_FATAL, "Cannot find a matching stream for "
|
||||||
"unlabeled input pad %d on filter %s\n", in->pad_idx,
|
"unlabeled input pad %d on filter %s\n", in->pad_idx,
|
||||||
in->filter_ctx->name);
|
in->filter_ctx->name);
|
||||||
exit(1);
|
exit_program(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
av_assert0(ist);
|
av_assert0(ist);
|
||||||
@ -268,7 +268,7 @@ static void init_input_filter(FilterGraph *fg, AVFilterInOut *in)
|
|||||||
|
|
||||||
GROW_ARRAY(fg->inputs, fg->nb_inputs);
|
GROW_ARRAY(fg->inputs, fg->nb_inputs);
|
||||||
if (!(fg->inputs[fg->nb_inputs - 1] = av_mallocz(sizeof(*fg->inputs[0]))))
|
if (!(fg->inputs[fg->nb_inputs - 1] = av_mallocz(sizeof(*fg->inputs[0]))))
|
||||||
exit(1);
|
exit_program(1);
|
||||||
fg->inputs[fg->nb_inputs - 1]->ist = ist;
|
fg->inputs[fg->nb_inputs - 1]->ist = ist;
|
||||||
fg->inputs[fg->nb_inputs - 1]->graph = fg;
|
fg->inputs[fg->nb_inputs - 1]->graph = fg;
|
||||||
|
|
||||||
@ -552,7 +552,7 @@ static int configure_output_audio_filter(FilterGraph *fg, OutputFilter *ofilter,
|
|||||||
AVIOContext *pb; \
|
AVIOContext *pb; \
|
||||||
\
|
\
|
||||||
if (avio_open_dyn_buf(&pb) < 0) \
|
if (avio_open_dyn_buf(&pb) < 0) \
|
||||||
exit(1); \
|
exit_program(1); \
|
||||||
\
|
\
|
||||||
avio_printf(pb, "%s", ctx->filter->name); \
|
avio_printf(pb, "%s", ctx->filter->name); \
|
||||||
if (nb_pads > 1) \
|
if (nb_pads > 1) \
|
||||||
@ -866,7 +866,7 @@ int configure_filtergraph(FilterGraph *fg)
|
|||||||
for (cur = outputs; cur;) {
|
for (cur = outputs; cur;) {
|
||||||
GROW_ARRAY(fg->outputs, fg->nb_outputs);
|
GROW_ARRAY(fg->outputs, fg->nb_outputs);
|
||||||
if (!(fg->outputs[fg->nb_outputs - 1] = av_mallocz(sizeof(*fg->outputs[0]))))
|
if (!(fg->outputs[fg->nb_outputs - 1] = av_mallocz(sizeof(*fg->outputs[0]))))
|
||||||
exit(1);
|
exit_program(1);
|
||||||
fg->outputs[fg->nb_outputs - 1]->graph = fg;
|
fg->outputs[fg->nb_outputs - 1]->graph = fg;
|
||||||
fg->outputs[fg->nb_outputs - 1]->out_tmp = cur;
|
fg->outputs[fg->nb_outputs - 1]->out_tmp = cur;
|
||||||
cur = cur->next;
|
cur = cur->next;
|
||||||
|
Loading…
Reference in New Issue
Block a user