av1parser: Remove impossible condition
authorSeungha Yang <seungha@centricular.com>
Thu, 17 Nov 2022 16:41:33 +0000 (01:41 +0900)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Sat, 19 Nov 2022 11:58:01 +0000 (11:58 +0000)
unsigned integer cannot be negative

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3430>

subprojects/gst-plugins-bad/gst-libs/gst/codecparsers/gstav1parser.c

index e2876db01f8b292dfe0c6d598aced63dd36dc66f..17a72ba9ed5392b5343a3080335637750bf3ae82 100644 (file)
@@ -1449,9 +1449,7 @@ gst_av1_parser_parse_sequence_header_obu (GstAV1Parser * parser,
   gst_av1_parse_reset_state (parser, FALSE);
 
   /* choose_operating_point() set the operating_point */
-  if (parser->state.operating_point < 0 ||
-      parser->state.operating_point >
-      seq_header->operating_points_cnt_minus_1) {
+  if (parser->state.operating_point > seq_header->operating_points_cnt_minus_1) {
     GST_WARNING ("Invalid operating_point %d set by user, just use 0",
         parser->state.operating_point);
     parser->state.operating_point_idc = seq_header->operating_points[0].idc;