summaryrefslogtreecommitdiff
path: root/avplay.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2012-03-23 15:46:30 +0100
committerAnton Khirnov <anton@khirnov.net>2012-04-15 20:22:36 +0200
commitb7327887ea260d26e4fe98d34149cd57168f2ba3 (patch)
tree9b5dce4ee98a03933e0fd6825ef0e694af0b13bd /avplay.c
parent7af99a01c4e77efa002a672d72f142257e87bf38 (diff)
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 'avplay.c')
-rw-r--r--avplay.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/avplay.c b/avplay.c
index 4ebccb2acf..a11f952402 100644
--- a/avplay.c
+++ b/avplay.c
@@ -1701,9 +1701,10 @@ static AVFilter input_filter =
static int configure_video_filters(AVFilterGraph *graph, VideoState *is, const char *vfilters)
{
+ static const enum PixelFormat pix_fmts[] = { PIX_FMT_YUV420P, PIX_FMT_NONE };
char sws_flags_str[128];
int ret;
- SinkContext sink_ctx = { .pix_fmt = PIX_FMT_YUV420P };
+ SinkContext sink_ctx = { .pix_fmts = pix_fmts };
AVFilterContext *filt_src = NULL, *filt_out = NULL;
snprintf(sws_flags_str, sizeof(sws_flags_str), "flags=%d", sws_flags);
graph->scale_sws_opts = av_strdup(sws_flags_str);