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 @@ -361,8 +361,10 @@ void kinesis_video_producer_init(GstKvsSink *kvssink)
361361 session_token_str,
362362 std::chrono::seconds (DEFAULT_ROTATION_PERIOD_SECONDS)));
363363 credential_provider.reset (new StaticCredentialProvider (*kvssink->credentials_ ));
364- } else {
364+ } else if (kvssink-> credential_file_path != nullptr && static_cast < bool >( std::ifstream (kvssink-> credential_file_path ))) {
365365 credential_provider.reset (new RotatingCredentialProvider (kvssink->credential_file_path ));
366+ } else {
367+ throw runtime_error (" Could not find any AWS credentials!" );
366368 }
367369
368370 // 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