Coverity scan:
Logically dead code: The indicated dead code may have performed some
action; that action will never occur.
By using pointer arithmetic is impossible to get NULL.
num_nal_arrays = buf[22];
ofs = 23;
for (i = 0; i < num_nal_arrays; i++) {
- const guchar *data;
-
if (ofs + 1 > buf_size)
return GST_VAAPI_DECODER_STATUS_ERROR_NO_DATA;
- data = buf + ofs + 1;
- if (!data)
- return GST_VAAPI_DECODER_STATUS_ERROR_NO_DATA;
- num_nals = GST_READ_UINT16_BE (data);
+ num_nals = GST_READ_UINT16_BE (buf + ofs + 1);
/* the max number of nals is GST_H265_MAX_PPS_COUNT (64) */
if (num_nals > 64)
return GST_VAAPI_DECODER_STATUS_ERROR_BITSTREAM_PARSER;