On Mon, 2010-01-11 at 14:56 -0800, Zack Rusin wrote: 
> Module: Mesa
> Branch: mesa_7_7_branch
> Commit: 3447d545d99c450c6a13d8a37e9cb9f5463a40eb
> URL:    
> http://cgit.freedesktop.org/mesa/mesa/commit/?id=3447d545d99c450c6a13d8a37e9cb9f5463a40eb
> 
> Author: Zack Rusin <za...@vmware.com>
> Date:   Mon Jan 11 18:03:49 2010 -0500
> 
> st/xorg: fix a rare video crash
> 
> sometimes dst isn't present if a window is in a middle of a resize, stop
> crashing in those cases and just ignore a frame.
> 
> ---
> 
>  src/gallium/state_trackers/xorg/xorg_xv.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/src/gallium/state_trackers/xorg/xorg_xv.c 
> b/src/gallium/state_trackers/xorg/xorg_xv.c
> index 19c5005..666ff10 100644
> --- a/src/gallium/state_trackers/xorg/xorg_xv.c
> +++ b/src/gallium/state_trackers/xorg/xorg_xv.c
> @@ -486,7 +486,7 @@ display_video(ScrnInfoPtr pScrn, struct xorg_xv_port_priv 
> *pPriv, int id,
>     Bool hdtv;
>     int x, y, w, h;
>     struct exa_pixmap_priv *dst = exaGetPixmapDriverPrivate(pPixmap);
> -   struct pipe_surface *dst_surf = xorg_gpu_surface(pPriv->r->pipe->screen, 
> dst);
> +   struct pipe_surface *dst_surf = NULL;
>  
>     if (dst && !dst->tex) {
>       xorg_exa_set_shared_usage(pPixmap);
> @@ -496,6 +496,7 @@ display_video(ScrnInfoPtr pScrn, struct xorg_xv_port_priv 
> *pPriv, int id,
>     if (!dst || !dst->tex)
>        XORG_FALLBACK("Xv destination %s", !dst ? "!dst" : "!dst->tex");
>  
> +   dst_surf = xorg_gpu_surface(pPriv->r->pipe->screen, dst);
>     hdtv = ((src_w >= RES_720P_X) && (src_h >= RES_720P_Y));
>  
>     REGION_TRANSLATE(pScrn->pScreen, dstRegion, -pPixmap->screen_x,

A better fix should be to make sure the exaMoveInPixmap() call is before
the exaGetPixmapDriverPrivate() call. The latter should never return
NULL then (unless we run out of resources maybe - might be worth keeping
the checks for that).


-- 
Earthling Michel Dänzer           |                http://www.vmware.com
Libre software enthusiast         |          Debian, X and DRI developer

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to