From: Wim Taymans Date: Tue, 26 Oct 2004 17:59:18 +0000 (+0000) Subject: ext/dv/gstdvdec.c: Allow a little margin when negotiating the framerate. X-Git-Tag: BRANCH-GSTREAMER-0_8-ROOT~453 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=17d464c602c9635ea84ba8d1237793bd8fac8d1f;p=platform%2Fupstream%2Fgst-plugins-good.git ext/dv/gstdvdec.c: Allow a little margin when negotiating the framerate. Original commit message from CVS: * ext/dv/gstdvdec.c: (gst_dvdec_video_getcaps), (gst_dvdec_video_link), (gst_dvdec_push), (gst_dvdec_loop): Allow a little margin when negotiating the framerate. --- diff --git a/ChangeLog b/ChangeLog index c43c566..8381c72 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2004-10-26 Wim Taymans + + * ext/dv/gstdvdec.c: (gst_dvdec_video_getcaps), + (gst_dvdec_video_link), (gst_dvdec_push), (gst_dvdec_loop): + Allow a little margin when negotiating the framerate. + 2004-10-26 Stefan Kost * gst/level/gstlevel.c: diff --git a/ext/dv/gstdvdec.c b/ext/dv/gstdvdec.c index ea89158..19bf308 100644 --- a/ext/dv/gstdvdec.c +++ b/ext/dv/gstdvdec.c @@ -21,6 +21,7 @@ #include "config.h" #endif #include +#include /* First, include the header file for the plugin, to bring in the * object definition and other useful things. @@ -824,8 +825,9 @@ gst_dvdec_video_link (GstPad * pad, const GstCaps * caps) !gst_structure_get_double (structure, "framerate", &framerate)) return GST_PAD_LINK_REFUSED; - if ((height != dvdec->height) - || (framerate != dvdec->framerate / dvdec->drop_factor)) + /* allow a margin of error for the framerate caused by float rounding errors */ + if ((height != dvdec->height) || + (fabs (framerate - (dvdec->framerate / dvdec->drop_factor)) > 0.00000001)) return GST_PAD_LINK_REFUSED; if (strcmp (gst_structure_get_name (structure), "video/x-raw-rgb") == 0) {