st/xvmc: respect caps when creating video buffers
authorChristian König <deathsimple@vodafone.de>
Wed, 1 Feb 2012 23:07:43 +0000 (00:07 +0100)
committerChristian König <deathsimple@vodafone.de>
Mon, 6 Feb 2012 09:35:59 +0000 (10:35 +0100)
Signed-off-by: Christian König <deathsimple@vodafone.de>
src/gallium/state_trackers/xorg/xvmc/surface.c

index f1c32714cc6a0b7889181f134c815de42749f8df..024612e7414460c61fa8d2ddc96099363dcd9c7b 100644 (file)
@@ -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;