Skip to content

Commit

Permalink
fix(bmm): allow no video file to be returned from mergedata
Browse files Browse the repository at this point in the history
  • Loading branch information
fredrikvedvik committed Nov 10, 2023
1 parent 542c52a commit 861ee9f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions workflows/export/merge_export_data.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (

type MergeExportDataResult struct {
Duration float64
VideoFile paths.Path
VideoFile *paths.Path
AudioFiles map[string]paths.Path
SubtitleFiles map[string]paths.Path
}
Expand Down Expand Up @@ -67,15 +67,15 @@ func MergeExportData(ctx workflow.Context, params MergeExportDataParams) (*Merge

}

var videoFile paths.Path
var videoFile *paths.Path
if params.MakeVideo {
videoTask := wfutils.ExecuteWithQueue(ctx, activities.TranscodeMergeVideo, mergeInput)
var result common.MergeResult
err := videoTask.Get(ctx, &result)
if err != nil {
return nil, err
}
videoFile = result.Path
videoFile = &result.Path
}

var audioFiles = map[string]paths.Path{}
Expand Down
2 changes: 1 addition & 1 deletion workflows/export/vx_export_playout.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func VXExportToPlayout(ctx workflow.Context, params VXExportChildWorkflowParams)
var videoResult common.VideoResult
err = workflow.ExecuteActivity(ctx, activities.TranscodeToXDCAMActivity, activities.EncodeParams{
Bitrate: "50M",
FilePath: params.MergeResult.VideoFile,
FilePath: *params.MergeResult.VideoFile,
OutputDir: xdcamOutputDir,
Resolution: r1080p,
FrameRate: 25,
Expand Down
2 changes: 1 addition & 1 deletion workflows/export/vx_export_vod.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func VXExportToVOD(ctx workflow.Context, params VXExportChildWorkflowParams) (*V
ctx = workflow.WithChildOptions(ctx, wfutils.GetDefaultWorkflowOptions())
err := workflow.ExecuteChildWorkflow(ctx, PrepareFiles, PrepareFilesParams{
OutputPath: params.TempDir,
VideoFile: params.MergeResult.VideoFile,
VideoFile: *params.MergeResult.VideoFile,
AudioFiles: params.MergeResult.AudioFiles,
WatermarkPath: wm,
}).Get(ctx, &result)
Expand Down

0 comments on commit 861ee9f

Please sign in to comment.