[vlc-commits] deinterlace: fix field duration based on the source frame rate
Steve Lhomme
git at videolan.org
Mon Nov 4 12:15:01 CET 2019
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Thu Jul 11 13:18:46 2019 +0200| [ad615ce04eb81209635800b490cbfb8c06ff4432] | committer: Steve Lhomme
deinterlace: fix field duration based on the source frame rate
The frame rate is a field per second. To get a duration we divide seconds by
the number of fields. This what the vlc_tick_from_samples() call does. But we
divide by 0 without this fix.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ad615ce04eb81209635800b490cbfb8c06ff4432
---
modules/video_filter/deinterlace/common.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/video_filter/deinterlace/common.c b/modules/video_filter/deinterlace/common.c
index 1195016678..f0bc3e830e 100644
--- a/modules/video_filter/deinterlace/common.c
+++ b/modules/video_filter/deinterlace/common.c
@@ -92,7 +92,7 @@ vlc_tick_t GetFieldDuration(const struct deinterlace_ctx *p_context,
/* One field took this long. */
i_field_dur = (p_pic->date - p_context->meta[i].pi_date) / i_fields_total;
}
- else if (fmt->i_frame_rate_base)
+ else if (fmt->i_frame_rate)
i_field_dur = vlc_tick_from_samples( fmt->i_frame_rate_base, fmt->i_frame_rate);
/* Note that we default to field duration 0 if it could not be
More information about the vlc-commits
mailing list