ccconverter: check fraction multiply for overflow

It should not happen and if it does, something went very wrong earlier

CID 1463350

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1262>
This commit is contained in:
Matthew Waters 2020-05-12 16:05:01 +10:00
parent 09cbe4cd03
commit 6dae95d60f

View file

@ -460,8 +460,10 @@ interpolate_time_code_with_framerate (GstCCConverter * self,
if (!tc || tc->config.fps_n == 0)
return FALSE;
gst_util_fraction_multiply (tc->frames, 1, scale_n, scale_d, &output_n,
&output_d);
if (!gst_util_fraction_multiply (tc->frames, 1, scale_n, scale_d, &output_n,
&output_d))
/* we should never overflow */
g_assert_not_reached ();
tc_str = gst_video_time_code_to_string (tc);
GST_TRACE_OBJECT (self, "interpolating time code %s with scale %d/%d "