Skip to content

Commit 1212d45

Browse files
author
Francisco Souza
committed
provider/encodingcom: fix bug in newly introduced adjustSize function
1 parent 26ee911 commit 1212d45

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

provider/encodingcom/encodingcom.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,8 +283,8 @@ func (e *encodingComProvider) parseSize(size string) (width int64, height int64,
283283

284284
func (e *encodingComProvider) adjustSize(reportedSize string, sourceInfo *encodingcom.MediaInfo) (width int64, height int64, err error) {
285285
width, height, err = e.parseSize(reportedSize)
286-
if err != nil {
287-
return 0, 0, err
286+
if err != nil || sourceInfo == nil {
287+
return width, height, err
288288
}
289289
if width != 0 && height != 0 {
290290
return width, height, nil

0 commit comments

Comments
 (0)