diff --git a/provider/elastictranscoder/aws.go b/provider/elastictranscoder/aws.go index d49641a9..03d2fa5c 100644 --- a/provider/elastictranscoder/aws.go +++ b/provider/elastictranscoder/aws.go @@ -408,7 +408,10 @@ func elasticTranscoderFactory(cfg *config.Config) (provider.TranscodingProvider, if region == "" { region = defaultAWSRegion } - awsSession := session.New(aws.NewConfig().WithCredentials(creds).WithRegion(region)) + awsSession, err := session.NewSession(aws.NewConfig().WithCredentials(creds).WithRegion(region)) + if err != nil { + return nil, err + } return &awsProvider{ c: elastictranscoder.New(awsSession), config: cfg.ElasticTranscoder, diff --git a/provider/zencoder/zencoder.go b/provider/zencoder/zencoder.go index 0d51c9c3..423cb956 100644 --- a/provider/zencoder/zencoder.go +++ b/provider/zencoder/zencoder.go @@ -100,6 +100,9 @@ func (z *zencoderProvider) buildOutputs(job *db.Job) ([]*zencoder.OutputSettings } if hlsOutputs > 0 { optimizedOutputs, err := z.optimizeOutputsForHLS(zencoderOutputs) + if err != nil { + return nil, err + } outputsWithHLSPlaylist := make([]*zencoder.OutputSettings, len(optimizedOutputs)+1) copy(outputsWithHLSPlaylist, optimizedOutputs) hlsPlaylist, err := z.buildHLSPlaylist(optimizedOutputs, hlsOutputs, job)