Skip to content

Commit

Permalink
Fix type conversion issue in video duration calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
AmarnathCJD committed Feb 6, 2024
1 parent bfdbf40 commit ae5b421
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion telegram/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ mediaTypeSwitch:
break
}
if a, ok := at.(*DocumentAttributeVideo); ok {
var duration = int64(getValue(a.Duration, int32(GetVideoDuration(fileName))).(int32))
var duration = int64(getValue(int32(a.Duration), int32(GetVideoDuration(fileName))).(int32))
if a.W == 0 || a.H == 0 {
w, h := GetVideoDimensions(fileName)
if w > 0 && h > 0 {
Expand Down

0 comments on commit ae5b421

Please sign in to comment.