summaryrefslogtreecommitdiff
path: root/gst/rtp
diff options
context:
space:
mode:
authorLuis de Bethencourt <luis.bg@samsung.com>2015-01-08 15:36:04 +0000
committerLuis de Bethencourt <luis.bg@samsung.com>2015-01-08 15:36:04 +0000
commit54ce23e0cba7fe41b3fa4957360e15a99eb0515f (patch)
tree5e1998174b96525ae017d95286e95b6e4ac81b8a /gst/rtp
parent66a08297c7eaf21edc553094194004acddfa6c47 (diff)
downloadgstreamer-plugins-bad-54ce23e0cba7fe41b3fa4957360e15a99eb0515f.tar.gz
rtp: value truncated too short creates dead code
type is truncated to 0-31 with "& 0x1f", but right after that it is checks if the value is equivalent to GST_H265_NAL_VPS, GST_H265_NAL_SPS, and GST_H265_NAL_PPS (which are 32, 33, and 34 respectively). Obviously, this will never be True if the value is maximum 31 after the truncation. The intention of the code was to truncate to 0-63.
Diffstat (limited to 'gst/rtp')
-rw-r--r--gst/rtp/gstrtph265pay.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gst/rtp/gstrtph265pay.c b/gst/rtp/gstrtph265pay.c
index 629c6e021..b2da44d99 100644
--- a/gst/rtp/gstrtph265pay.c
+++ b/gst/rtp/gstrtph265pay.c
@@ -821,7 +821,7 @@ gst_rtp_h265_pay_decode_nal (GstRtpH265Pay * payloader,
GST_DEBUG ("NAL payload len=%u", size);
header = data[0];
- type = header & 0x1f;
+ type = header & 0x3f;
/* We record the timestamp of the last SPS/PPS so
* that we can insert them at regular intervals and when needed. */