From: Dave Badia <dba...@gmail.com> Signed-off-by: Janne Grunau <janne-li...@jannau.net> --- libavformat/mov.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/libavformat/mov.c b/libavformat/mov.c index dc5b42b..5b444ab 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -2253,6 +2253,10 @@ static int mov_read_tkhd(MOVContext *c, AVIOContext *pb, MOVAtom atom) sc->width = width >> 16; sc->height = height >> 16; + if (display_matrix[0][0] == -65536 && display_matrix[1][1] == -65536) { + av_metadata_set2(&st->metadata, "rotate", "180", 0); + } + // 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 -- 1.8.5.3 _______________________________________________ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel