h265parse: Fix content light level value changes

The comparision was not testing anything meaninful. This fixes the comparision
so we now update the caps whenever the value differ. This was detected by
coverity.

CID 1461291
This commit is contained in:
Nicolas Dufresne 2020-04-07 17:04:30 -04:00
parent 6680b70781
commit 84a58b3633

View file

@ -654,8 +654,8 @@ gst_h265_parse_process_sei (GstH265Parse * h265parse, GstH265NalUnit * nalu)
if (h265parse->content_light_level_state == GST_H265_PARSE_SEI_EXPIRED) { if (h265parse->content_light_level_state == GST_H265_PARSE_SEI_EXPIRED) {
h265parse->update_caps = TRUE; h265parse->update_caps = TRUE;
} else if (cll.max_content_light_level != } else if (cll.max_content_light_level !=
h265parse->content_light_level.max_frame_average_light_level || h265parse->content_light_level.max_content_light_level ||
cll.max_content_light_level != cll.max_frame_average_light_level !=
h265parse->content_light_level.max_frame_average_light_level) { h265parse->content_light_level.max_frame_average_light_level) {
h265parse->update_caps = TRUE; h265parse->update_caps = TRUE;
} }