From f4451b764f06f5db543dbb994d97a93f569799a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 1 Oct 2014 17:18:05 +0300 Subject: [PATCH] videoaggregator: Revert the last commit and handle resolutions differences properly This is about converting the format, not about converting any widths and heights. Subclasses are expected to handler different resolutions themselves, like the videomixers already do properly. --- gst-libs/gst/video/gstvideoaggregator.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/gst-libs/gst/video/gstvideoaggregator.c b/gst-libs/gst/video/gstvideoaggregator.c index bd9095f3eb..00dd666c7d 100644 --- a/gst-libs/gst/video/gstvideoaggregator.c +++ b/gst-libs/gst/video/gstvideoaggregator.c @@ -447,16 +447,14 @@ gst_videoaggregator_update_converters (GstVideoAggregator * vagg) if (best_format != GST_VIDEO_INFO_FORMAT (&pad->info) || g_strcmp0 (colorimetry, best_colorimetry) || g_strcmp0 (chroma, best_chroma)) { + GstVideoInfo tmp_info = pad->info; + tmp_info.finfo = best_info.finfo; + GST_DEBUG_OBJECT (pad, "This pad will be converted from %d to %d", GST_VIDEO_INFO_FORMAT (&pad->info), GST_VIDEO_INFO_FORMAT (&best_info)); - /* TODO: GstVideoConverter currently can't rescale! */ - if (pad->info.width == best_info.width && - pad->info.height == best_info.height && - pad->info.par_n == best_info.par_n && - pad->info.par_d == best_info.par_d) - pad->priv->convert = - gst_video_converter_new (&pad->info, &best_info, NULL); + pad->priv->convert = + gst_video_converter_new (&pad->info, &tmp_info, NULL); pad->need_conversion_update = TRUE; if (!pad->priv->convert) { g_free (colorimetry);