summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2017-08-09 19:06:59 +0200
committerVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2017-08-09 19:06:59 +0200
commit241b95dad26ff6559f8e2a8e66c20273ef68b475 (patch)
tree2dc1a1eb8884f811c75ca9bbcc86ff0e38edd6be
parente42ec3ad3c5dfcc9ae6826b6b215b8d6efd856ab (diff)
libs: decoder: h265: remove spurious codeHEADmaster
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.
-rw-r--r--gst-libs/gst/vaapi/gstvaapidecoder_h265.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_h265.c b/gst-libs/gst/vaapi/gstvaapidecoder_h265.c
index a1c856d3..9d2fa6ee 100644
--- a/gst-libs/gst/vaapi/gstvaapidecoder_h265.c
+++ b/gst-libs/gst/vaapi/gstvaapidecoder_h265.c
@@ -2666,14 +2666,9 @@ gst_vaapi_decoder_h265_decode_codec_data (GstVaapiDecoder *
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;