[0.11] gst-plugins-base: videoscale: Fix assertion on caps fixation

Wim Taymans wtay at kemper.freedesktop.org
Wed Mar 30 12:41:08 PDT 2011


Module: gst-plugins-base
Branch: 0.11
Commit: 91ed9290b880804ac479a9ddcab256494f7a31d6
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?id=91ed9290b880804ac479a9ddcab256494f7a31d6

Author: Thiago Santos <thiago.sousa.santos at collabora.co.uk>
Date:   Thu Feb 24 08:42:34 2011 -0300

videoscale: Fix assertion on caps fixation

When fixating caps, from_par should always be initialized
with a fixed value.

In case the fixation is from src to sink pad it was setting
the from par (srcpad par) to a fraction range, this patch initializes
it to 1/1, based on the assumption that missing PAR is 1/1.

https://bugzilla.gnome.org/show_bug.cgi?id=641952

---

 gst/videoscale/gstvideoscale.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/gst/videoscale/gstvideoscale.c b/gst/videoscale/gstvideoscale.c
index aaf104b..ac2968a 100644
--- a/gst/videoscale/gstvideoscale.c
+++ b/gst/videoscale/gstvideoscale.c
@@ -501,8 +501,8 @@ gst_video_scale_fixate_caps (GstBaseTransform * base, GstPadDirection direction,
           NULL);
     }
     if (!from_par) {
-      g_value_init (&fpar, GST_TYPE_FRACTION_RANGE);
-      gst_value_set_fraction_range_full (&fpar, 1, G_MAXINT, G_MAXINT, 1);
+      g_value_init (&fpar, GST_TYPE_FRACTION);
+      gst_value_set_fraction (&fpar, 1, 1);
       from_par = &fpar;
     }
   }



More information about the gstreamer-commits mailing list