mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-07 16:49:52 +00:00
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:
parent
09cbe4cd03
commit
6dae95d60f
1 changed files with 4 additions and 2 deletions
|
@ -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 "
|
||||
|
|
Loading…
Reference in a new issue