From 14f47d164d198e6aabce7348d9574c8253134708 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6nig?= Date: Thu, 2 Feb 2012 00:07:43 +0100 Subject: [PATCH] st/xvmc: respect caps when creating video buffers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christian König --- src/gallium/state_trackers/xorg/xvmc/surface.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/gallium/state_trackers/xorg/xvmc/surface.c b/src/gallium/state_trackers/xorg/xvmc/surface.c index f1c32714cc6..024612e7414 100644 --- a/src/gallium/state_trackers/xorg/xvmc/surface.c +++ b/src/gallium/state_trackers/xorg/xvmc/surface.c @@ -184,6 +184,12 @@ Status XvMCCreateSurface(Display *dpy, XvMCContext *context, XvMCSurface *surfac tmpl.chroma_format = context_priv->decoder->chroma_format; tmpl.width = context_priv->decoder->width; tmpl.height = context_priv->decoder->height; + tmpl.interlaced = pipe->screen->get_video_param + ( + pipe->screen, + PIPE_VIDEO_PROFILE_MPEG2_MAIN, + PIPE_VIDEO_CAP_PREFERS_INTERLACED + ); surface_priv->video_buffer = pipe->create_video_buffer(pipe, &tmpl); surface_priv->context = context;