summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Waters <matthew@centricular.com>2023-03-09 14:38:13 +1100
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>2023-03-15 02:56:16 +0000
commitff204668c3fa72b7448aa23db5f0739c9da83eb8 (patch)
treec4b37e81bd2536a2dff86ce4216bb013d09ae818
parentbb711444b643eb719ec06ec1354b2181e5816b88 (diff)
cea708overlay: fix HCR interpretation
An unsigned counter with a for (i = end; i >= 0; i--), can be optimized to infinite loop as an unsigned value will always be >= 0. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4174>
-rw-r--r--subprojects/gst-plugins-bad/ext/closedcaption/gstcea708decoder.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/subprojects/gst-plugins-bad/ext/closedcaption/gstcea708decoder.c b/subprojects/gst-plugins-bad/ext/closedcaption/gstcea708decoder.c
index b2e9f98b6f..af6a1796e3 100644
--- a/subprojects/gst-plugins-bad/ext/closedcaption/gstcea708decoder.c
+++ b/subprojects/gst-plugins-bad/ext/closedcaption/gstcea708decoder.c
@@ -983,13 +983,13 @@ static void
gst_cea708dec_show_pango_window (Cea708Dec * decoder, guint window_id)
{
cea708Window *window = decoder->cc_windows[window_id];
- guint16 row, col;
+ gint16 row, col;
gboolean display = FALSE; /* = TRUE when text lines should be written */
gchar line_buffer[LINEBUFFER_SIZE];
gchar outchar_utf8[CC_UTF8_MAX_LENGTH + 1] = { 0 };
guint8 utf8_char_length;
- guint16 i, j;
- guint16 right_index; /* within a single line of window text, the
+ gint16 i, j;
+ gint16 right_index; /* within a single line of window text, the
* index of the rightmost non-blank character */
guint16 index;
guint len = 0;
@@ -1653,8 +1653,8 @@ static void
gst_cea708dec_window_add_char (Cea708Dec * decoder, gunichar c)
{
cea708Window *window = decoder->cc_windows[decoder->current_window];
- guint16 pen_row;
- guint16 pen_col;
+ gint16 pen_row;
+ gint16 pen_col;
/* Add one character to the current window, using current pen location.
* Wrap pen location if necessary */