diff options
Diffstat (limited to 'libavfilter/defaults.c')
-rw-r--r-- | libavfilter/defaults.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libavfilter/defaults.c b/libavfilter/defaults.c index ed1db94b69..27c8a3bcdc 100644 --- a/libavfilter/defaults.c +++ b/libavfilter/defaults.c @@ -160,7 +160,11 @@ void avfilter_set_common_formats(AVFilterContext *ctx, AVFilterFormats *formats) int avfilter_default_query_formats(AVFilterContext *ctx) { - avfilter_set_common_formats(ctx, avfilter_all_colorspaces()); + enum AVMediaType type = ctx->inputs [0] ? ctx->inputs [0]->type : + ctx->outputs[0] ? ctx->outputs[0]->type : + AVMEDIA_TYPE_VIDEO; + + avfilter_set_common_formats(ctx, avfilter_all_formats(type)); return 0; } |