audiomixer: critical error for blocksize, timeout min/max values
authorVineeth T M <vineeth.tm@samsung.com>
Mon, 20 Oct 2014 12:55:08 +0000 (18:25 +0530)
committerTim-Philipp Müller <tim@centricular.com>
Sat, 2 Dec 2017 15:10:26 +0000 (15:10 +0000)
Audiomixer blocksize, cant be 0, hence adjusting the minimum value to 1
timeout value of aggregator is defined with MAX of MAXINT64,
but it cannot cross G_MAXLONG * GST_SECOND - 1
Hence changed the max value of the same

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

libs/gst/base/gstaggregator.c

index a4e1e8d..7d59037 100644 (file)
@@ -1420,8 +1420,8 @@ gst_aggregator_class_init (GstAggregatorClass * klass)
       g_param_spec_int64 ("timeout", "Buffer timeout",
           "Number of nanoseconds to wait for a buffer to arrive on a sink pad"
           "before the pad is deemed unresponsive (-1 unlimited)", -1,
-          G_MAXINT64, DEFAULT_TIMEOUT,
-          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+          (G_MAXLONG == G_MAXINT64) ? G_MAXINT64 : (G_MAXLONG * GST_SECOND - 1),
+          DEFAULT_TIMEOUT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 }
 
 static void