diff options
Diffstat (limited to 'libavfilter/sink_buffer.c')
-rw-r--r-- | libavfilter/sink_buffer.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/libavfilter/sink_buffer.c b/libavfilter/sink_buffer.c index 926362bef8..8eb695e167 100644 --- a/libavfilter/sink_buffer.c +++ b/libavfilter/sink_buffer.c @@ -165,9 +165,9 @@ static av_cold int vsink_init(AVFilterContext *ctx, const char *args, void *opaq av_unused AVBufferSinkParams *params; if (!opaque) { - av_log(ctx, AV_LOG_ERROR, + av_log(ctx, AV_LOG_WARNING, "No opaque field provided\n"); - return AVERROR(EINVAL); + buf->pixel_fmts = NULL; } else { #if FF_API_OLD_VSINK_API const int *pixel_fmts = (const enum PixelFormat *)opaque; @@ -194,7 +194,11 @@ static int vsink_query_formats(AVFilterContext *ctx) { BufferSinkContext *buf = ctx->priv; - avfilter_set_common_pixel_formats(ctx, avfilter_make_format_list(buf->pixel_fmts)); + if (buf->pixel_fmts) + avfilter_set_common_pixel_formats(ctx, avfilter_make_format_list(buf->pixel_fmts)); + else + avfilter_default_query_formats(ctx); + return 0; } |