encoder: h264: casts slice_param->slice_type
authorVíctor Manuel Jáquez Leal <vjaquez@igalia.com>
Fri, 3 Apr 2015 18:33:44 +0000 (20:33 +0200)
committerVíctor Manuel Jáquez Leal <vjaquez@igalia.com>
Wed, 8 Apr 2015 14:20:55 +0000 (16:20 +0200)
slice_type in slice_param is defined as (char *), but it is compared against a
signed integer. clang complains about this comparison.

This patch casts the variable.

https://bugzilla.gnome.org/show_bug.cgi?id=747312

gst-libs/gst/vaapi/gstvaapiencoder_h264.c

index 2a5a3c757dfb92da1e3113585f459ab09e2f4654..1287e813698a90ad77dcfb1893633765fbd6309e 100644 (file)
@@ -1838,7 +1838,7 @@ add_slice_headers (GstVaapiEncoderH264 * encoder, GstVaapiEncPicture * picture,
     slice_param->num_macroblocks = cur_slice_mbs;
     slice_param->macroblock_info = VA_INVALID_ID;
     slice_param->slice_type = h264_get_slice_type (picture->type);
-    g_assert (slice_param->slice_type != -1);
+    g_assert ((gint8) slice_param->slice_type != -1);
     slice_param->pic_parameter_set_id = encoder->view_idx;
     slice_param->idr_pic_id = encoder->idr_num;
     slice_param->pic_order_cnt_lsb = picture->poc;