File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed
Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -366,8 +366,10 @@ void kinesis_video_producer_init(GstKvsSink *kvssink)
366366 session_token_str,
367367 std::chrono::seconds (DEFAULT_ROTATION_PERIOD_SECONDS)));
368368 credential_provider.reset (new StaticCredentialProvider (*kvssink->credentials_ ));
369- } else {
369+ } else if (kvssink-> credential_file_path != nullptr && static_cast < bool >( std::ifstream (kvssink-> credential_file_path ))) {
370370 credential_provider.reset (new RotatingCredentialProvider (kvssink->credential_file_path ));
371+ } else {
372+ throw runtime_error (" Could not find any AWS credentials!" );
371373 }
372374
373375 // Handle env for providing CP URL
Original file line number Diff line number Diff line change 3636#include < string.h>
3737#include < mutex>
3838#include < atomic>
39+ #include < fstream>
3940#include < gst/base/gstcollectpads.h>
4041#include < unordered_set>
4142
You can’t perform that action at this time.
0 commit comments