textoverlay: Ignore zero framerate

https://bugzilla.gnome.org/show_bug.cgi?id=606163
This commit is contained in:
Olivier Crête 2010-01-05 17:17:58 -05:00 committed by Sebastian Dröge
parent bc6179952b
commit 15fb8f9bf7

View file

@ -2035,7 +2035,8 @@ gst_text_overlay_video_chain (GstPad * pad, GstBuffer * buffer)
gint fps_num, fps_denom;
s = gst_caps_get_structure (GST_PAD_CAPS (pad), 0);
if (gst_structure_get_fraction (s, "framerate", &fps_num, &fps_denom)) {
if (gst_structure_get_fraction (s, "framerate", &fps_num, &fps_denom) &&
fps_num && fps_denom) {
GST_DEBUG_OBJECT (overlay, "estimating duration based on framerate");
stop = start + gst_util_uint64_scale_int (GST_SECOND, fps_denom, fps_num);
} else {