Skip to content

Commit

Permalink
Revert "Stop falling back based on audio codec (#796)" (#798)
Browse files Browse the repository at this point in the history
This reverts commit 1283aea.
  • Loading branch information
thomshutt authored Aug 8, 2023
1 parent 1283aea commit 46f8bda
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion pipeline/coordinator.go
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,8 @@ func (c *Coordinator) startUploadJob(p UploadJobPayload) {
func checkLivepeerCompatible(requestID string, strategy Strategy, iv video.InputVideo) (bool, Strategy) {
for _, track := range iv.Tracks {
// if the codecs are not compatible then override to external pipeline to avoid sending to Livepeer
if track.Type == video.TrackTypeVideo && strings.ToLower(track.Codec) != "h264" {
if (track.Type == video.TrackTypeVideo && strings.ToLower(track.Codec) != "h264") ||
(track.Type == video.TrackTypeAudio && strings.ToLower(track.Codec) != "aac") {
log.Log(requestID, "codec not supported by Livepeer pipeline", "trackType", track.Type, "codec", track.Codec)
return livepeerNotSupported(strategy)
}
Expand Down
8 changes: 4 additions & 4 deletions pipeline/coordinator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,7 @@ func Test_checkMistCompatible(t *testing.T) {
},
},
}
nonAACAudio := video.InputVideo{
inCompatibleAudio := video.InputVideo{
Tracks: []video.InputTrack{
{
Codec: "h264",
Expand Down Expand Up @@ -753,10 +753,10 @@ func Test_checkMistCompatible(t *testing.T) {
name: "incompatible with ffmpeg - StrategyFallbackExternal",
args: args{
strategy: StrategyFallbackExternal,
iv: nonAACAudio,
iv: inCompatibleAudio,
},
want: StrategyFallbackExternal,
wantSupported: true,
want: StrategyExternalDominance,
wantSupported: false,
},
{
name: "compatible with ffmpeg - StrategyFallbackExternal",
Expand Down

0 comments on commit 46f8bda

Please sign in to comment.