Skip to content

Commit

Permalink
provider/encodingcom: fix bug in newly introduced adjustSize function
Browse files Browse the repository at this point in the history
  • Loading branch information
Francisco Souza committed Apr 4, 2017
1 parent 26ee911 commit 1212d45
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions provider/encodingcom/encodingcom.go
Original file line number Diff line number Diff line change
Expand Up @@ -283,8 +283,8 @@ func (e *encodingComProvider) parseSize(size string) (width int64, height int64,

func (e *encodingComProvider) adjustSize(reportedSize string, sourceInfo *encodingcom.MediaInfo) (width int64, height int64, err error) {
width, height, err = e.parseSize(reportedSize)
if err != nil {
return 0, 0, err
if err != nil || sourceInfo == nil {
return width, height, err
}
if width != 0 && height != 0 {
return width, height, nil
Expand Down

0 comments on commit 1212d45

Please sign in to comment.