appsrc: fix compiler warning

Initialize min and max _get_property() to gets rid of these
compiler warnings:

gstappsrc.c:741:7: error: 'max' may be used uninitialized in this function
       g_value_set_int64 (value, max);
       ^
gstappsrc.c:733:7: error: 'min' may be used uninitialized in this function
       g_value_set_int64 (value, min);
       ^
Which happens because gcc doesn't know that GST_IS_APP_SRC will never
fail here.

https://bugzilla.gnome.org/show_bug.cgi?id=752052
This commit is contained in:
Tobias Mueller 2015-07-02 07:23:23 +02:00 committed by Tim-Philipp Müller
parent 0cf08d90c0
commit 57ff3ea72f

View file

@ -758,7 +758,7 @@ gst_app_src_get_property (GObject * object, guint prop_id, GValue * value,
break; break;
case PROP_MIN_LATENCY: case PROP_MIN_LATENCY:
{ {
guint64 min; guint64 min = 0;
gst_app_src_get_latency (appsrc, &min, NULL); gst_app_src_get_latency (appsrc, &min, NULL);
g_value_set_int64 (value, min); g_value_set_int64 (value, min);
@ -766,7 +766,7 @@ gst_app_src_get_property (GObject * object, guint prop_id, GValue * value,
} }
case PROP_MAX_LATENCY: case PROP_MAX_LATENCY:
{ {
guint64 max; guint64 max = 0;
gst_app_src_get_latency (appsrc, NULL, &max); gst_app_src_get_latency (appsrc, NULL, &max);
g_value_set_int64 (value, max); g_value_set_int64 (value, max);