From 1221a09a5dc48eea2c34972ec2ea6b105d156dbe Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Sun, 5 Jan 2025 12:10:59 +0100 Subject: [PATCH] closedcaption: Use proper type for storing result drop_ccp_from_cc_data() will return a negative value if there was an error. Storing that in an unsigned value will cause the checks for errors to never happen. Part-of: --- subprojects/gst-plugins-bad/ext/closedcaption/gstcccombiner.c | 3 ++- subprojects/gst-plugins-bad/ext/closedcaption/gstcea608mux.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/subprojects/gst-plugins-bad/ext/closedcaption/gstcccombiner.c b/subprojects/gst-plugins-bad/ext/closedcaption/gstcccombiner.c index d3dc337db8..4b07e30902 100644 --- a/subprojects/gst-plugins-bad/ext/closedcaption/gstcccombiner.c +++ b/subprojects/gst-plugins-bad/ext/closedcaption/gstcccombiner.c @@ -219,7 +219,8 @@ static void take_s334_both_fields (GstCCCombiner * self, GstBuffer * buffer) { GstMapInfo out = GST_MAP_INFO_INIT; - guint s334_len, cc_data_len, i; + gint s334_len; + guint cc_data_len, i; gst_buffer_map (buffer, &out, GST_MAP_READWRITE); diff --git a/subprojects/gst-plugins-bad/ext/closedcaption/gstcea608mux.c b/subprojects/gst-plugins-bad/ext/closedcaption/gstcea608mux.c index 32ff44b0a4..5495e3ae9b 100644 --- a/subprojects/gst-plugins-bad/ext/closedcaption/gstcea608mux.c +++ b/subprojects/gst-plugins-bad/ext/closedcaption/gstcea608mux.c @@ -188,7 +188,8 @@ static void take_s334_both_fields (GstCea608Mux * self, GstBuffer * buffer) { GstMapInfo out = GST_MAP_INFO_INIT; - guint s334_len, cc_data_len, i; + gint s334_len; + guint cc_data_len, i; gst_buffer_map (buffer, &out, GST_MAP_READWRITE);