[Libva] [PATCH v2][libva-intel-driver] i965_encoder: remove double check for VAStatus result

Charles, Daniel daniel.charles at intel.com
Thu Aug 18 19:40:05 UTC 2016


On Thu, Aug 18, 2016 at 12:29 PM, Sean V Kelley <sean.v.kelley at intel.com> wrote:
> Hi Daniel,
>
> On Mon, Aug 15, 2016 at 11:28 AM, Daniel Charles <daniel.charles at intel.com>
> wrote:
>>
>> after creating underlying surface there's a double check on the
>> VAStatus result. Replace it with ASSERT_RET.
>>
>> Signed-off-by: Daniel Charles <daniel.charles at intel.com>
>> ---
>>  src/i965_encoder.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/src/i965_encoder.c b/src/i965_encoder.c
>> index beea811..d909846 100644
>> --- a/src/i965_encoder.c
>> +++ b/src/i965_encoder.c
>> @@ -153,7 +153,7 @@ intel_encoder_check_yuv_surface(VADriverContextP ctx,
>>                                   VA_RT_FORMAT_YUV420,
>>                                   1,
>>                                   &encoder_context->input_yuv_surface);
>> -    assert(status == VA_STATUS_SUCCESS);
>> +    ASSERT_RET(status == VA_STATUS_SUCCESS, status);
>>
>>      if (status != VA_STATUS_SUCCESS)
>>          return status;
>
>
> You don't need this conditional with the ASSERT_RET().  Remove it too.

You're right, I wasn't understanding ASSERT_RET, v3 is on the way.
>
> Thanks,
>
> Sean
>
>>
>> --
>> 2.5.5
>>
>> _______________________________________________
>> Libva mailing list
>> Libva at lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/libva
>
>
>
>
> --
> Sean V. Kelley <sean.v.kelley at intel.com>
> Open Source Technology Center / SSG
> Intel Corp.


More information about the Libva mailing list