ges-uri-asset: fix compile error 'timeout' may be used uninitialized

https://bugzilla.gnome.org/show_bug.cgi?id=774751
This commit is contained in:
Philippe Renon 2016-11-20 15:34:46 +01:00 committed by Sebastian Dröge
parent b5cda44417
commit be48b040ea

View file

@ -33,6 +33,8 @@
#include "ges-internal.h" #include "ges-internal.h"
#include "ges-track-element-asset.h" #include "ges-track-element-asset.h"
#define DEFAULT_DISCOVERY_TIMEOUT (60 * GST_SECOND)
static GHashTable *parent_newparent_table = NULL; static GHashTable *parent_newparent_table = NULL;
static void static void
@ -207,6 +209,7 @@ ges_uri_clip_asset_class_init (GESUriClipAssetClass * klass)
g_object_class_install_property (object_class, PROP_DURATION, g_object_class_install_property (object_class, PROP_DURATION,
properties[PROP_DURATION]); properties[PROP_DURATION]);
timeout = DEFAULT_DISCOVERY_TIMEOUT;
errno = 0; errno = 0;
timeout_str = g_getenv ("GES_DISCOVERY_TIMEOUT"); timeout_str = g_getenv ("GES_DISCOVERY_TIMEOUT");
if (timeout_str) if (timeout_str)
@ -215,7 +218,7 @@ ges_uri_clip_asset_class_init (GESUriClipAssetClass * klass)
errno = 10; errno = 10;
if (errno) if (errno)
timeout = 60 * GST_SECOND; timeout = DEFAULT_DISCOVERY_TIMEOUT;
klass->discoverer = gst_discoverer_new (timeout, &err); klass->discoverer = gst_discoverer_new (timeout, &err);
if (!klass->discoverer) { if (!klass->discoverer) {