Skip to content

Commit

Permalink
Merge pull request #34 from blinemedical/VIDEO-2901-delay-default-cre…
Browse files Browse the repository at this point in the history
…dential-initialization

[VIDEO-2901] Delay default credential initialization
  • Loading branch information
jawilson authored Jul 22, 2024
2 parents 91219d1 + ed1bd78 commit b718b9e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
3 changes: 1 addition & 2 deletions meson.build
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
project('amazon-s3-gst-plugin', 'c', 'cpp',
version : '0.2.1-lldc.8',
version : '0.2.1-lldc.9',
default_options : [ 'warning_level=2',
'buildtype=debugoptimized' ])

Expand All @@ -19,7 +19,6 @@ endif

apiversion = '1.0'

glib_dep = dependency('glib-2.0')
gst_dep = dependency('gstreamer-1.0', version : gst_req,
fallback : ['gstreamer', 'gst_dep'])
gst_base_dep = dependency('gstreamer-base-1.0', version : gst_req,
Expand Down
7 changes: 5 additions & 2 deletions src/gsts3sink.c
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,6 @@ static void
gst_s3_sink_init (GstS3Sink * s3sink)
{
s3sink->config = GST_S3_UPLOADER_CONFIG_INIT;
s3sink->config.credentials = gst_aws_credentials_new_default ();
s3sink->uploader = NULL;
s3sink->downloader = NULL;
s3sink->is_started = FALSE;
Expand All @@ -328,7 +327,8 @@ gst_s3_sink_release_config (GstS3UploaderConfig * config)
g_free (config->content_type);
g_free (config->ca_file);
g_free (config->aws_sdk_endpoint);
gst_aws_credentials_free (config->credentials);
if (config->credentials)
gst_aws_credentials_free (config->credentials);

*config = GST_S3_UPLOADER_CONFIG_INIT;
}
Expand Down Expand Up @@ -533,6 +533,9 @@ gst_s3_sink_start (GstBaseSink * basesink)
|| gst_s3_sink_is_null_or_empty (sink->config.key)))
goto no_destination;

if (!sink->config.credentials)
sink->config.credentials = gst_aws_credentials_new_default ();

if (sink->uploader == NULL) {
sink->uploader = GST_S3_SINK_GET_CLASS((gpointer*) sink)->uploader_new (&sink->config);
}
Expand Down
2 changes: 1 addition & 1 deletion tests/check/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ foreach test_file : element_tests
)

env = environment()
env.set('GST_PLUGIN_PATH_1_0', meson.build_root())
env.set('GST_PLUGIN_PATH_1_0', meson.project_build_root())
env.set('GST_DEBUG', 'check:TRACE,s3sink:TRACE')
test(test_name, exe, timeout: 3 * 60, env: env)
endforeach

0 comments on commit b718b9e

Please sign in to comment.