diff --git a/gst-libs/gst/video/video-converter.c b/gst-libs/gst/video/video-converter.c index 2fa64fa6b6..c90ddaf791 100644 --- a/gst-libs/gst/video/video-converter.c +++ b/gst-libs/gst/video/video-converter.c @@ -4040,7 +4040,8 @@ setup_scale (GstVideoConverter * convert) in_width), GST_VIDEO_FORMAT_INFO_SCALE_WIDTH (out_finfo, GST_VIDEO_COMP_Y, out_width), convert->config); uv_scaler = - gst_video_scaler_new (method, GST_VIDEO_SCALER_FLAG_NONE, taps, + gst_video_scaler_new (method, GST_VIDEO_SCALER_FLAG_NONE, + gst_video_scaler_get_max_taps (y_scaler), GST_VIDEO_FORMAT_INFO_SCALE_WIDTH (in_finfo, GST_VIDEO_COMP_U, in_width), GST_VIDEO_FORMAT_INFO_SCALE_WIDTH (out_finfo, GST_VIDEO_COMP_U, out_width), convert->config); diff --git a/gst-libs/gst/video/video-scaler.c b/gst-libs/gst/video/video-scaler.c index 25e8b015a6..881fd08922 100644 --- a/gst-libs/gst/video/video-scaler.c +++ b/gst-libs/gst/video/video-scaler.c @@ -248,6 +248,22 @@ gst_video_scaler_free (GstVideoScaler * scale) g_slice_free (GstVideoScaler, scale); } +/** + * gst_video_scaler_get_max_taps: + * @scale: a #GstVideoScaler + * + * Get the maximum number of taps for @scale. + * + * Returns: the maximum number of taps + */ +guint +gst_video_scaler_get_max_taps (GstVideoScaler * scale) +{ + g_return_val_if_fail (scale != NULL, 0); + + return scale->resampler.max_taps; +} + /** * gst_video_scaler_get_coeff: * @scale: a #GstVideoScaler diff --git a/gst-libs/gst/video/video-scaler.h b/gst-libs/gst/video/video-scaler.h index 891a49de02..e4b752fd22 100644 --- a/gst-libs/gst/video/video-scaler.h +++ b/gst-libs/gst/video/video-scaler.h @@ -57,6 +57,7 @@ GstVideoScaler * gst_video_scaler_new (GstVideoResamplerMethod m GstStructure * options); void gst_video_scaler_free (GstVideoScaler *scale); +guint gst_video_scaler_get_max_taps (GstVideoScaler *scale); const gdouble * gst_video_scaler_get_coeff (GstVideoScaler *scale, guint out_offset, guint *in_offset,