diff options
author | Anton Khirnov <anton@khirnov.net> | 2012-03-23 15:46:30 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2012-04-15 20:22:36 +0200 |
commit | b7327887ea260d26e4fe98d34149cd57168f2ba3 (patch) | |
tree | 9b5dce4ee98a03933e0fd6825ef0e694af0b13bd /cmdutils.c | |
parent | 7af99a01c4e77efa002a672d72f142257e87bf38 (diff) | |
download | ffmpeg-b7327887ea260d26e4fe98d34149cd57168f2ba3.tar.gz |
avconv: get output pixel format from lavfi.
This way we don't require a clearly defined corresponding input stream.
The result for the xwd test changes because rgb24 is now chosen instead
of bgra.
Diffstat (limited to 'cmdutils.c')
-rw-r--r-- | cmdutils.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cmdutils.c b/cmdutils.c index 48cfff7ed5..d590d0a49f 100644 --- a/cmdutils.c +++ b/cmdutils.c @@ -1036,9 +1036,11 @@ static void null_end_frame(AVFilterLink *inlink) { } static int sink_query_formats(AVFilterContext *ctx) { SinkContext *priv = ctx->priv; - enum PixelFormat pix_fmts[] = { priv->pix_fmt, PIX_FMT_NONE }; - avfilter_set_common_formats(ctx, avfilter_make_format_list(pix_fmts)); + if (priv->pix_fmts) + avfilter_set_common_formats(ctx, avfilter_make_format_list(priv->pix_fmts)); + else + avfilter_default_query_formats(ctx); return 0; } |