summaryrefslogtreecommitdiff
path: root/gst/rtp
diff options
context:
space:
mode:
authorLuis de Bethencourt <luis.bg@samsung.com>2015-01-08 13:47:09 +0000
committerLuis de Bethencourt <luis.bg@samsung.com>2015-01-08 13:58:13 +0000
commit20dc27f983b3a6becfa34b77db1c9621010b8338 (patch)
treec09fe4469cc3263ae0a82827675b002da4f50f23 /gst/rtp
parent7d318a572c8c032336829a9afd2cda8c80d618e0 (diff)
downloadgstreamer-plugins-bad-20dc27f983b3a6becfa34b77db1c9621010b8338.tar.gz
rtp: fix dead code and check for impossible values
nal_type is the index for a GstH265NalUnitType enum. There are two types of dead code here: First, after checking if nal_type is >= 39 there are two OR conditionals that check if the value is in ranges higher than that number, so if nal_type >= 39 falls in the True branch those other conditions aren't checked and if it falls in the False branch and they are checked, they will always also be False. They are redundant. Second, the enum has a range of 0 to 40. So the checks for ranges higher than 41 should never be True. Removing this redundant checks. CID 1249684
Diffstat (limited to 'gst/rtp')
-rw-r--r--gst/rtp/gstrtph265depay.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/gst/rtp/gstrtph265depay.c b/gst/rtp/gstrtph265depay.c
index c25bc8150..edfdb9bd7 100644
--- a/gst/rtp/gstrtph265depay.c
+++ b/gst/rtp/gstrtph265depay.c
@@ -914,8 +914,7 @@ gst_rtp_h265_depay_handle_nal (GstRtpH265Depay * rtph265depay, GstBuffer * nal,
}
complete = TRUE;
} else if ((nal_type >= 32 && nal_type <= 35)
- || nal_type >= 39 || (nal_type >= 41 && nal_type <= 44)
- || (nal_type >= 48 && nal_type <= 55)) {
+ || nal_type >= 39) {
/* VPS, SPS, PPS, SEI, ... terminate an access unit */
complete = TRUE;
}