ttmlrender: Fix integer handling issue identified by coverity
authorChris Bass <floobleflam@gmail.com>
Wed, 19 Apr 2017 13:00:47 +0000 (14:00 +0100)
committerSebastian Dröge <sebastian@centricular.com>
Wed, 19 Apr 2017 17:28:31 +0000 (18:28 +0100)
Fixes CID #1405132.

ext/ttml/gstttmlrender.c

index ee1cb97..b6a63b5 100644 (file)
@@ -1985,7 +1985,7 @@ gst_ttml_render_draw_text (GstTtmlRender * render, const gchar * text,
   ret->width = buf_width;
   ret->height = buf_height;
   ret->x = 0;
-  ret->y = MAX (0, baseline_offset - (baseline - ink_rect.y));
+  ret->y = MAX (0, (gint) baseline_offset - (baseline - ink_rect.y));
   return ret;
 }