aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-01-15 03:02:14 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-01-15 04:00:51 +0100
commit89b6382bec08f386e1f4ec40cfabda77c581df9e (patch)
treed2b0d764ee048cf5362a9f5ee12426f9c9d8bf56
parentcd960c8a4f7cd78e3f7d13f78bdf01a5b8136dff (diff)
parentcf70ba37ba74089a18295b29e77dead0a3222c9e (diff)
downloadffmpeg-89b6382bec08f386e1f4ec40cfabda77c581df9e.tar.gz
Merge commit 'cf70ba37ba74089a18295b29e77dead0a3222c9e'
* commit 'cf70ba37ba74089a18295b29e77dead0a3222c9e': mov: Check angle rather than full matrix when updating SAR Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/mov.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 3dee572038..8312d2b105 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -29,13 +29,13 @@
#include "libavutil/attributes.h"
#include "libavutil/channel_layout.h"
-#include "libavutil/display.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/intfloat.h"
#include "libavutil/mathematics.h"
#include "libavutil/time_internal.h"
#include "libavutil/avstring.h"
#include "libavutil/dict.h"
+#include "libavutil/display.h"
#include "libavutil/opt.h"
#include "libavutil/timecode.h"
#include "libavcodec/ac3tab.h"
@@ -2867,15 +2867,10 @@ static int mov_read_tkhd(MOVContext *c, AVIOContext *pb, MOVAtom atom)
}
// transform the display width/height according to the matrix
- // skip this if the display matrix is the default identity matrix
- // or if it is rotating the picture, ex iPhone 3GS
+ // skip this if the rotation angle is 0 degrees
// to keep the same scale, use [width height 1<<16]
- if (width && height &&
- ((display_matrix[0][0] != 65536 ||
- display_matrix[1][1] != 65536) &&
- !display_matrix[0][1] &&
- !display_matrix[1][0] &&
- !display_matrix[2][0] && !display_matrix[2][1])) {
+ if (width && height && sc->display_matrix &&
+ av_display_rotation_get(sc->display_matrix) != 0.0f) {
for (i = 0; i < 2; i++)
disp_transform[i] =
(int64_t) width * display_matrix[0][i] +