Skip to content

Commit

Permalink
Skip resolution adjustment in case of missing video track (#358)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexKordic authored Nov 23, 2022
1 parent dacf4ac commit 7cef5fc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ffmpeg/ffmpeg.go
Original file line number Diff line number Diff line change
Expand Up @@ -860,7 +860,8 @@ func (t *Transcoder) Transcode(input *TranscodeOptionsIn, ps []TranscodeOptions)
if err != nil {
return nil, err
}
if status == CodecStatusOk {
videoTrackPresent := format.Vcodec != ""
if status == CodecStatusOk && videoTrackPresent {
// We don't return error in case status != CodecStatusOk because proper error would be returned later in the logic.
// Like 'TranscoderInvalidVideo' or `No such file or directory` would be replaced by error we specify here.
// here we require input size and aspect ratio
Expand Down

0 comments on commit 7cef5fc

Please sign in to comment.