aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-04-21 11:33:17 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-06-23 16:51:08 +0200
commit9cde200ba70f1c252ad6b1b5a13d7fe39626b9ed (patch)
treebf49f85bfa078a2755198e98ce8eb7402c2d409a /libavfilter
parentdf208d6ab93932abe792c764eac1c79a231b85fe (diff)
downloadffmpeg-9cde200ba70f1c252ad6b1b5a13d7fe39626b9ed.tar.gz
avfilter/filtfmts: Support dynamically allocated in/outputs
Fixes crash Fixes Ticket3468 Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 59c7615d58b5b7ea9caff2c8c774677973eb4f1c) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/filtfmts.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libavfilter/filtfmts.c b/libavfilter/filtfmts.c
index e6c9b039be..b3efa78343 100644
--- a/libavfilter/filtfmts.c
+++ b/libavfilter/filtfmts.c
@@ -38,7 +38,7 @@ static void print_formats(AVFilterContext *filter_ctx)
for (j = 0; j < fmts->nb_formats; j++) \
if(av_get_pix_fmt_name(fmts->formats[j])) \
printf(#INOUT "PUT[%d] %s: fmt:%s\n", \
- i, filter_ctx->filter->inout##puts[i].name, \
+ i, filter_ctx->inout##put_pads[i].name, \
av_get_pix_fmt_name(fmts->formats[j])); \
} else if (filter_ctx->inout##puts[i]->type == AVMEDIA_TYPE_AUDIO) { \
AVFilterFormats *fmts; \
@@ -47,7 +47,7 @@ static void print_formats(AVFilterContext *filter_ctx)
fmts = filter_ctx->inout##puts[i]->outin##_formats; \
for (j = 0; j < fmts->nb_formats; j++) \
printf(#INOUT "PUT[%d] %s: fmt:%s\n", \
- i, filter_ctx->filter->inout##puts[i].name, \
+ i, filter_ctx->inout##put_pads[i].name, \
av_get_sample_fmt_name(fmts->formats[j])); \
\
layouts = filter_ctx->inout##puts[i]->outin##_channel_layouts; \
@@ -56,7 +56,7 @@ static void print_formats(AVFilterContext *filter_ctx)
av_get_channel_layout_string(buf, sizeof(buf), -1, \
layouts->channel_layouts[j]); \
printf(#INOUT "PUT[%d] %s: chlayout:%s\n", \
- i, filter_ctx->filter->inout##puts[i].name, buf); \
+ i, filter_ctx->inout##put_pads[i].name, buf); \
} \
} \
} \
@@ -113,12 +113,12 @@ int main(int argc, char **argv)
/* create a link for each of the input pads */
for (i = 0; i < filter_ctx->nb_inputs; i++) {
AVFilterLink *link = av_mallocz(sizeof(AVFilterLink));
- link->type = filter_ctx->filter->inputs[i].type;
+ link->type = filter_ctx->input_pads[i].type;
filter_ctx->inputs[i] = link;
}
for (i = 0; i < filter_ctx->nb_outputs; i++) {
AVFilterLink *link = av_mallocz(sizeof(AVFilterLink));
- link->type = filter_ctx->filter->outputs[i].type;
+ link->type = filter_ctx->output_pads[i].type;
filter_ctx->outputs[i] = link;
}