gint len;
GstCaps *ourcaps;
GstCaps *peercaps;
+ gboolean half;
otherpad = (pad == self->srcpad) ? self->sinkpad : self->srcpad;
+ half = pad != self->srcpad;
ourcaps = gst_pad_get_pad_template_caps (pad);
peercaps = gst_pad_peer_query_caps (otherpad, NULL);
n = gst_value_get_fraction_numerator (val);
d = gst_value_get_fraction_denominator (val);
- if (!gst_fraction_double (&n, &d, pad != self->srcpad)) {
+ if (!gst_fraction_double (&n, &d, half)) {
goto error;
}
n = gst_value_get_fraction_numerator (min);
d = gst_value_get_fraction_denominator (min);
- if (!gst_fraction_double (&n, &d, pad != self->srcpad)) {
+ if (!gst_fraction_double (&n, &d, half)) {
g_value_unset (&nrange);
g_value_unset (&nmax);
g_value_unset (&nmin);
n = gst_value_get_fraction_numerator (max);
d = gst_value_get_fraction_denominator (max);
- if (!gst_fraction_double (&n, &d, pad != self->srcpad)) {
+ if (!gst_fraction_double (&n, &d, half)) {
g_value_unset (&nrange);
g_value_unset (&nmax);
g_value_unset (&nmin);
/* Double/Half the framerate but if this fails simply
* skip this value from the list */
- if (!gst_fraction_double (&n, &d, pad != self->srcpad)) {
+ if (!gst_fraction_double (&n, &d, half)) {
continue;
}