mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-16 05:16:36 +00:00
ccconverter: fix overflow when not doing framerate conversion
When converting from one framerate to another, counters are reset periodically, however when not converting they never are and can_genearte_output ends up making overflow-prone calculations with large values for input_frames and output_frames. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2465>
This commit is contained in:
parent
01c430fa45
commit
152813e71d
1 changed files with 6 additions and 0 deletions
|
@ -884,6 +884,12 @@ fit_and_scale_cc_data (GstCCConverter * self,
|
|||
if (tc && tc->config.fps_n != 0)
|
||||
interpolate_time_code_with_framerate (self, tc, out_fps_entry->fps_n,
|
||||
out_fps_entry->fps_d, 1, 1, &self->current_output_timecode);
|
||||
|
||||
self->scratch_ccp_len = 0;
|
||||
self->scratch_cea608_1_len = 0;
|
||||
self->scratch_cea608_2_len = 0;
|
||||
self->input_frames = 0;
|
||||
self->output_frames = 0;
|
||||
} else {
|
||||
int input_frame_n, input_frame_d, output_frame_n, output_frame_d;
|
||||
int output_time_cmp, scale_n, scale_d, rate_cmp;
|
||||
|
|
Loading…
Reference in a new issue