Skip to content

Commit

Permalink
When migrating a video with a secondary audio component in it, the vi…
Browse files Browse the repository at this point in the history
…deo track has Parameters set to null. It was throwing an exception here
  • Loading branch information
srayan authored and pohhsu committed Nov 17, 2023
1 parent 063ba68 commit 75b20dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion migrationTool/transform/ShakaPackager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ private IEnumerable<string> GetArguments(IList<string> inputs, IList<string> out
{
if (!string.IsNullOrEmpty(manifests[i]))
{
var source = t.Parameters.SingleOrDefault(p => p.Name == TRANSCRIPT_SOURCE)?.Value ?? t.Source;
var source = t.Parameters?.SingleOrDefault(p => p.Name == TRANSCRIPT_SOURCE)?.Value ?? t.Source;
var ext = t.IsMultiFile ? (t is TextTrack ? VTT_FILE : MEDIA_FILE) : string.Empty;
var file = $"{source}{ext}";
var index = Inputs.IndexOf(file);
Expand Down

0 comments on commit 75b20dd

Please sign in to comment.