mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 05:06:17 +00:00
ccconverter: reintroduce frame count reset on cycle completion
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4308>
This commit is contained in:
parent
55db8367f7
commit
b132a44ba5
1 changed files with 10 additions and 0 deletions
|
@ -627,6 +627,11 @@ can_take_buffer (GstCCConverter * self,
|
||||||
output_time_cmp = gst_util_fraction_compare (input_frame_n, input_frame_d,
|
output_time_cmp = gst_util_fraction_compare (input_frame_n, input_frame_d,
|
||||||
output_frame_n, output_frame_d);
|
output_frame_n, output_frame_d);
|
||||||
|
|
||||||
|
if (output_time_cmp == 0) {
|
||||||
|
self->output_frames = 0;
|
||||||
|
self->input_frames = 0;
|
||||||
|
}
|
||||||
|
|
||||||
in_fps_entry = cdp_fps_entry_from_fps (self->in_fps_n, self->in_fps_d);
|
in_fps_entry = cdp_fps_entry_from_fps (self->in_fps_n, self->in_fps_d);
|
||||||
if (!in_fps_entry || in_fps_entry->fps_n == 0)
|
if (!in_fps_entry || in_fps_entry->fps_n == 0)
|
||||||
g_assert_not_reached ();
|
g_assert_not_reached ();
|
||||||
|
@ -1578,6 +1583,11 @@ can_generate_output (GstCCConverter * self)
|
||||||
output_time_cmp = gst_util_fraction_compare (input_frame_n, input_frame_d,
|
output_time_cmp = gst_util_fraction_compare (input_frame_n, input_frame_d,
|
||||||
output_frame_n, output_frame_d);
|
output_frame_n, output_frame_d);
|
||||||
|
|
||||||
|
if (output_time_cmp == 0) {
|
||||||
|
self->output_frames = 0;
|
||||||
|
self->input_frames = 0;
|
||||||
|
}
|
||||||
|
|
||||||
/* if the next output frame is at or before the current input frame */
|
/* if the next output frame is at or before the current input frame */
|
||||||
if (output_time_cmp >= 0)
|
if (output_time_cmp >= 0)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
Loading…
Reference in a new issue