Merge pull request #12 from lgaribaldi/rotate-tag
Add check for rotate tag
This commit is contained in:
commit
cf92b10b6b
1 changed files with 3 additions and 0 deletions
3
video.go
3
video.go
|
@ -168,6 +168,9 @@ func (video *Video) addVideoData(data map[string]string) {
|
|||
if height, ok := data["height"]; ok {
|
||||
video.height = int(parse(height))
|
||||
}
|
||||
if rotation, ok := data["tag:rotate"]; ok && (rotation == "90" || rotation == "270") {
|
||||
video.width, video.height = video.height, video.width
|
||||
}
|
||||
if duration, ok := data["duration"]; ok {
|
||||
video.duration = float64(parse(duration))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue