aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/mov.c
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2009-06-25 00:17:47 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2009-06-25 00:17:47 +0000
commitd862fce758f5f084fbe9a82c1dd32e413af1703a (patch)
treeb0c793875f133dd7bb6d7111576f2c8531d6cd4a /libavformat/mov.c
parent91d19d471b7bd8c621813a02e8cfe068e19ba699 (diff)
downloadffmpeg-d862fce758f5f084fbe9a82c1dd32e413af1703a.tar.gz
only set par if it does not indicates a rotation, ex iphone 3GS
Originally committed as revision 19271 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/mov.c')
-rw-r--r--libavformat/mov.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index a5583495c2..74698e0547 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -1671,13 +1671,16 @@ static int mov_read_tkhd(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
sc->width = width >> 16;
sc->height = height >> 16;
- //transform the display width/height according to the matrix
+ // 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
// to keep the same scale, use [width height 1<<16]
if (width && height &&
- (display_matrix[0][0] != 65536 || display_matrix[0][1] ||
- display_matrix[1][0] || display_matrix[1][1] != 65536 ||
- display_matrix[2][0] || display_matrix[2][1])) {
+ ((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])) {
for (i = 0; i < 2; i++)
disp_transform[i] =
(int64_t) width * display_matrix[0][i] +