Skip to content

Commit

Permalink
Missing return codes on some calls in snapshot_grab
Browse files Browse the repository at this point in the history
  • Loading branch information
wberube committed Aug 19, 2024
1 parent f2d913b commit 94eafb3
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions src/hal/hisi/v1_hal.c
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@ int v1_video_snapshot_grab(char index, hal_jpegdata *jpeg)
}

unsigned int count = 1;
if (v1_venc.fnStartReceivingEx(index, &count)) {
if (ret = v1_venc.fnStartReceivingEx(index, &count)) {
HAL_DANGER("v1_venc", "Requesting one frame "
"%d failed with %#x!\n", index, ret);
goto abort;
Expand All @@ -624,7 +624,7 @@ int v1_video_snapshot_grab(char index, hal_jpegdata *jpeg)

if (FD_ISSET(fd, &readFds)) {
v1_venc_stat stat;
if (v1_venc.fnQuery(index, &stat)) {
if (ret = v1_venc.fnQuery(index, &stat)) {
HAL_DANGER("v1_venc", "Querying the encoder channel "
"%d failed with %#x!\n", index, ret);
goto abort;
Expand Down
4 changes: 2 additions & 2 deletions src/hal/hisi/v2_hal.c
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,7 @@ int v2_video_snapshot_grab(char index, hal_jpegdata *jpeg)
}

unsigned int count = 1;
if (v2_venc.fnStartReceivingEx(index, &count)) {
if (ret = v2_venc.fnStartReceivingEx(index, &count)) {
HAL_DANGER("v2_venc", "Requesting one frame "
"%d failed with %#x!\n", index, ret);
goto abort;
Expand All @@ -666,7 +666,7 @@ int v2_video_snapshot_grab(char index, hal_jpegdata *jpeg)

if (FD_ISSET(fd, &readFds)) {
v2_venc_stat stat;
if (v2_venc.fnQuery(index, &stat)) {
if (ret = v2_venc.fnQuery(index, &stat)) {
HAL_DANGER("v2_venc", "Querying the encoder channel "
"%d failed with %#x!\n", index, ret);
goto abort;
Expand Down
4 changes: 2 additions & 2 deletions src/hal/hisi/v3_hal.c
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,7 @@ int v3_video_snapshot_grab(char index, hal_jpegdata *jpeg)
}

unsigned int count = 1;
if (v3_venc.fnStartReceivingEx(index, &count)) {
if (ret = v3_venc.fnStartReceivingEx(index, &count)) {
HAL_DANGER("v3_venc", "Requesting one frame "
"%d failed with %#x!\n", index, ret);
goto abort;
Expand All @@ -685,7 +685,7 @@ int v3_video_snapshot_grab(char index, hal_jpegdata *jpeg)

if (FD_ISSET(fd, &readFds)) {
v3_venc_stat stat;
if (v3_venc.fnQuery(index, &stat)) {
if (ret = v3_venc.fnQuery(index, &stat)) {
HAL_DANGER("v3_venc", "Querying the encoder channel "
"%d failed with %#x!\n", index, ret);
goto abort;
Expand Down
4 changes: 2 additions & 2 deletions src/hal/hisi/v4_hal.c
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,7 @@ int v4_video_snapshot_grab(char index, hal_jpegdata *jpeg)
}

unsigned int count = 1;
if (v4_venc.fnStartReceivingEx(index, &count)) {
if (ret = v4_venc.fnStartReceivingEx(index, &count)) {
HAL_DANGER("v4_venc", "Requesting one frame "
"%d failed with %#x!\n", index, ret);
goto abort;
Expand All @@ -731,7 +731,7 @@ int v4_video_snapshot_grab(char index, hal_jpegdata *jpeg)

if (FD_ISSET(fd, &readFds)) {
v4_venc_stat stat;
if (v4_venc.fnQuery(index, &stat)) {
if (ret = v4_venc.fnQuery(index, &stat)) {
HAL_DANGER("v4_venc", "Querying the encoder channel "
"%d failed with %#x!\n", index, ret);
goto abort;
Expand Down
4 changes: 2 additions & 2 deletions src/hal/inge/t31_hal.c
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ int t31_video_snapshot_grab(char index, hal_jpegdata *jpeg)
goto abort;
}

if (t31_venc.fnStartReceiving(index)) {
if (ret = t31_venc.fnStartReceiving(index)) {
HAL_DANGER("t31_venc", "Requesting one frame "
"%d failed with %#x!\n", index, ret);
goto abort;
Expand All @@ -509,7 +509,7 @@ int t31_video_snapshot_grab(char index, hal_jpegdata *jpeg)

if (FD_ISSET(fd, &readFds)) {
t31_venc_stat stat;
if (t31_venc.fnQuery(index, &stat)) {
if (ret = t31_venc.fnQuery(index, &stat)) {
HAL_DANGER("t31_venc", "Querying the encoder channel "
"%d failed with %#x!\n", index, ret);
goto abort;
Expand Down
4 changes: 2 additions & 2 deletions src/hal/star/i6_hal.c
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,7 @@ int i6_video_snapshot_grab(char index, char quality, hal_jpegdata *jpeg)
}

unsigned int count = 1;
if (i6_venc.fnStartReceivingEx(index, &count)) {
if (ret = i6_venc.fnStartReceivingEx(index, &count)) {
HAL_DANGER("i6_venc", "Requesting one frame "
"%d failed with %#x!\n", index, ret);
goto abort;
Expand All @@ -695,7 +695,7 @@ int i6_video_snapshot_grab(char index, char quality, hal_jpegdata *jpeg)

if (FD_ISSET(fd, &readFds)) {
i6_venc_stat stat;
if (i6_venc.fnQuery(index, &stat)) {
if (ret = i6_venc.fnQuery(index, &stat)) {
HAL_DANGER("i6_venc", "Querying the encoder channel "
"%d failed with %#x!\n", index, ret);
goto abort;
Expand Down
4 changes: 2 additions & 2 deletions src/hal/star/i6c_hal.c
Original file line number Diff line number Diff line change
Expand Up @@ -760,7 +760,7 @@ int i6c_video_snapshot_grab(char index, char quality, hal_jpegdata *jpeg)
}

unsigned int count = 1;
if (i6c_venc.fnStartReceivingEx(_i6c_venc_dev[index], index, &count)) {
if (ret = i6c_venc.fnStartReceivingEx(_i6c_venc_dev[index], index, &count)) {
HAL_DANGER("i6c_venc", "Requesting one frame "
"%d failed with %#x!\n", index, ret);
goto abort;
Expand All @@ -783,7 +783,7 @@ int i6c_video_snapshot_grab(char index, char quality, hal_jpegdata *jpeg)

if (FD_ISSET(fd, &readFds)) {
i6c_venc_stat stat;
if (i6c_venc.fnQuery(_i6c_venc_dev[index], index, &stat)) {
if (ret = i6c_venc.fnQuery(_i6c_venc_dev[index], index, &stat)) {
HAL_DANGER("i6c_venc", "Querying the encoder channel "
"%d failed with %#x!\n", index, ret);
goto abort;
Expand Down
4 changes: 2 additions & 2 deletions src/hal/star/i6f_hal.c
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,7 @@ int i6f_video_snapshot_grab(char index, char quality, hal_jpegdata *jpeg)
}

unsigned int count = 1;
if (i6f_venc.fnStartReceivingEx(_i6f_venc_dev[index], index, &count)) {
if (ret = i6f_venc.fnStartReceivingEx(_i6f_venc_dev[index], index, &count)) {
HAL_DANGER("i6f_venc", "Requesting one frame "
"%d failed with %#x!\n", index, ret);
goto abort;
Expand All @@ -739,7 +739,7 @@ int i6f_video_snapshot_grab(char index, char quality, hal_jpegdata *jpeg)

if (FD_ISSET(fd, &readFds)) {
i6f_venc_stat stat;
if (i6f_venc.fnQuery(_i6f_venc_dev[index], index, &stat)) {
if (ret = i6f_venc.fnQuery(_i6f_venc_dev[index], index, &stat)) {
HAL_DANGER("i6f_venc", "Querying the encoder channel "
"%d failed with %#x!\n", index, ret);
goto abort;
Expand Down

0 comments on commit 94eafb3

Please sign in to comment.