Skip to content

Commit

Permalink
csc: handle Gscaler errors
Browse files Browse the repository at this point in the history
Change-Id: I75f0d0966e9f7ef10068645df0f41fa6b837c517
Signed-off-by: Greg Hackmann <[email protected]>
  • Loading branch information
greghackmann authored and fourkbomb committed Jun 20, 2018
1 parent a87244b commit 3e94b54
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions libcsc/csc.c
Original file line number Diff line number Diff line change
Expand Up @@ -555,8 +555,7 @@ static CSC_ERRORCODE csc_init_hw(
if (csc_handle->csc_method == CSC_METHOD_HW) {
if (csc_handle->csc_hw_handle == NULL) {
ALOGE("%s:: CSC_METHOD_HW can't open HW", __func__);
free(csc_handle);
csc_handle = NULL;
ret = CSC_Error;
}
}

Expand Down Expand Up @@ -1049,11 +1048,19 @@ CSC_ERRORCODE csc_convert(
return CSC_ErrorNotInit;

if ((csc_handle->csc_method == CSC_METHOD_HW) &&
(csc_handle->csc_hw_handle == NULL))
csc_init_hw(handle);
(csc_handle->csc_hw_handle == NULL)) {
ret = csc_init_hw(handle);
if (ret != CSC_ErrorNone)
return ret;
}

csc_set_format(csc_handle);
csc_set_buffer(csc_handle);
ret = csc_set_format(csc_handle);
if (ret != CSC_ErrorNone)
return ret;

ret = csc_set_buffer(csc_handle);
if (ret != CSC_ErrorNone)
return ret;

if (csc_handle->csc_method == CSC_METHOD_HW)
ret = conv_hw(csc_handle);
Expand Down

0 comments on commit 3e94b54

Please sign in to comment.