Fix video metadata rotation reading.
This commit is contained in:
@@ -648,7 +648,8 @@ int ReadRotationFromMetadata(not_null<AVStream*> stream) {
|
||||
AV_PKT_DATA_DISPLAYMATRIX);
|
||||
auto theta = 0;
|
||||
if (displaymatrix) {
|
||||
theta = -round(av_display_rotation_get((int32_t*)displaymatrix));
|
||||
const auto matrix = (int32_t*)displaymatrix->data;
|
||||
theta = -round(av_display_rotation_get(matrix));
|
||||
}
|
||||
theta -= 360 * floor(theta / 360 + 0.9 / 360);
|
||||
const auto result = int(base::SafeRound(theta));
|
||||
|
||||
Reference in New Issue
Block a user