[Libva] [PATCH] Fix for check i965_check_alloc_surface_bo ret

Zhao Yakui yakui.zhao at intel.com
Fri Mar 21 01:35:52 PDT 2014


On Fri, 2014-03-21 at 02:00 -0600, Zhao, Halley wrote:
> Bug is introduced by my previous patch.
> 
> i965_check_alloc_surface_bo used to be void return,
> when I improve it to return VAStatus, the check should be inside the {}.

Thanks for your fix.

This will be pushed.
> 
> 
> > -----Original Message-----
> > From: Zhao, Halley
> > Sent: Friday, March 21, 2014 3:57 PM
> > To: libva at lists.freedesktop.org
> > Cc: Zhao, Halley
> > Subject: [PATCH] Fix for check i965_check_alloc_surface_bo ret
> > 
> > From: "Zhao, Halley" <halley.zhao at intel.com>
> > 
> > ---
> >  src/i965_drv_video.c | 5 ++---
> >  1 file changed, 2 insertions(+), 3 deletions(-)
> > 
> > diff --git a/src/i965_drv_video.c b/src/i965_drv_video.c index
> > 750d92e..67f93ef 100755
> > --- a/src/i965_drv_video.c
> > +++ b/src/i965_drv_video.c
> > @@ -3204,11 +3204,10 @@ VAStatus i965_DeriveImage(VADriverContextP ctx,
> >          i965_guess_surface_format(ctx, surface, &fourcc, &is_tiled);
> >          int sampling = get_sampling_from_fourcc(fourcc);
> >          va_status = i965_check_alloc_surface_bo(ctx, obj_surface,
> > is_tiled, fourcc, sampling);
> > +        if (va_status != VA_STATUS_SUCCESS)
> > +            return va_status;
> >      }
> > 
> > -    if (va_status != VA_STATUS_SUCCESS)
> > -        return va_status;
> > -
> >      ASSERT_RET(obj_surface->fourcc, VA_STATUS_ERROR_INVALID_SURFACE);
> > 
> >      w_pitch = obj_surface->width;
> > --
> > 1.8.3.2
> 
> _______________________________________________
> Libva mailing list
> Libva at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/libva




More information about the Libva mailing list