diff options
author | Zack Rusin <[email protected]> | 2010-01-11 18:27:59 -0500 |
---|---|---|
committer | Zack Rusin <[email protected]> | 2010-01-11 18:27:59 -0500 |
commit | d880b64423d9eab7e6cbe3ad93dfefd6a9613cce (patch) | |
tree | e1e960909c3f9562d45ee0a28fd5423c0b2cd581 /src/gallium/state_trackers | |
parent | 3447d545d99c450c6a13d8a37e9cb9f5463a40eb (diff) |
st/xorg: move exaMoveInPixmap before trying to fetch it
as Michel suggested, this is a cleaner way of fixing crashes caused
by exaGetPixmapDriverPrivate returning null since the data hasn't
been moved yet.
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r-- | src/gallium/state_trackers/xorg/xorg_xv.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/state_trackers/xorg/xorg_xv.c b/src/gallium/state_trackers/xorg/xorg_xv.c index 666ff104b97..a4373705256 100644 --- a/src/gallium/state_trackers/xorg/xorg_xv.c +++ b/src/gallium/state_trackers/xorg/xorg_xv.c @@ -485,9 +485,12 @@ display_video(ScrnInfoPtr pScrn, struct xorg_xv_port_priv *pPriv, int id, int dxo, dyo; Bool hdtv; int x, y, w, h; - struct exa_pixmap_priv *dst = exaGetPixmapDriverPrivate(pPixmap); + struct exa_pixmap_priv *dst; struct pipe_surface *dst_surf = NULL; + exaMoveInPixmap(pPixmap); + dst = exaGetPixmapDriverPrivate(pPixmap); + if (dst && !dst->tex) { xorg_exa_set_shared_usage(pPixmap); pScrn->pScreen->ModifyPixmapHeader(pPixmap, 0, 0, 0, 0, 0, NULL); @@ -516,7 +519,6 @@ display_video(ScrnInfoPtr pScrn, struct xorg_xv_port_priv *pPriv, int id, bind_samplers(pPriv); setup_fs_video_constants(pPriv->r, hdtv); - exaMoveInPixmap(pPixmap); DamageDamageRegion(&pPixmap->drawable, dstRegion); while (nbox--) { |