Skip to content

Commit cf92b10

Browse files
authored
Merge pull request #12 from lgaribaldi/rotate-tag
Add check for rotate tag
2 parents 2c67651 + 63cca29 commit cf92b10

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

video.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,9 @@ func (video *Video) addVideoData(data map[string]string) {
168168
if height, ok := data["height"]; ok {
169169
video.height = int(parse(height))
170170
}
171+
if rotation, ok := data["tag:rotate"]; ok && (rotation == "90" || rotation == "270") {
172+
video.width, video.height = video.height, video.width
173+
}
171174
if duration, ok := data["duration"]; ok {
172175
video.duration = float64(parse(duration))
173176
}

0 commit comments

Comments
 (0)