[FFmpeg-cvslog] avfilter/filtfmts: Support dynamically allocated in/outputs
Michael Niedermayer
git at videolan.org
Sun Jul 20 19:17:05 CEST 2014
ffmpeg | branch: release/1.0 | Michael Niedermayer <michaelni at gmx.at> | Mon Apr 21 11:33:17 2014 +0200| [ee0db8a51f8c24d7297e43aed2119a4595740d88] | committer: Michael Niedermayer
avfilter/filtfmts: Support dynamically allocated in/outputs
Fixes crash
Fixes Ticket3468
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit 59c7615d58b5b7ea9caff2c8c774677973eb4f1c)
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ee0db8a51f8c24d7297e43aed2119a4595740d88
---
libavfilter/filtfmts.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/libavfilter/filtfmts.c b/libavfilter/filtfmts.c
index 14417cb..e2a542a 100644
--- a/libavfilter/filtfmts.c
+++ b/libavfilter/filtfmts.c
@@ -41,7 +41,7 @@ static void print_formats(AVFilterContext *filter_ctx)
for (j = 0; j < fmts->format_count; 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; \
@@ -50,7 +50,7 @@ static void print_formats(AVFilterContext *filter_ctx)
fmts = filter_ctx->inout##puts[i]->outin##_formats; \
for (j = 0; j < fmts->format_count; 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; \
@@ -59,7 +59,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); \
} \
} \
} \
@@ -109,12 +109,12 @@ int main(int argc, char **argv)
/* create a link for each of the input pads */
for (i = 0; i < filter_ctx->input_count; 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->output_count; 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;
}
More information about the ffmpeg-cvslog
mailing list