summaryrefslogtreecommitdiff
path: root/libavformat/movenc.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/movenc.c')
-rw-r--r--libavformat/movenc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 11b26708ae..3b4e3b519c 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -2496,19 +2496,23 @@ static int mov_write_tkhd_tag(AVIOContext *pb, MOVMuxContext *mov,
avio_wb16(pb, 0); /* reserved */
/* Matrix structure */
+#if FF_API_OLD_ROTATE_API
if (st && st->metadata) {
AVDictionaryEntry *rot = av_dict_get(st->metadata, "rotate", NULL, 0);
rotation = (rot && rot->value) ? atoi(rot->value) : 0;
}
+#endif
if (display_matrix) {
for (i = 0; i < 9; i++)
avio_wb32(pb, display_matrix[i]);
+#if FF_API_OLD_ROTATE_API
} else if (rotation == 90) {
write_matrix(pb, 0, 1, -1, 0, track->par->height, 0);
} else if (rotation == 180) {
write_matrix(pb, -1, 0, 0, -1, track->par->width, track->par->height);
} else if (rotation == 270) {
write_matrix(pb, 0, -1, 1, 0, 0, track->par->width);
+#endif
} else {
write_matrix(pb, 1, 0, 0, 1, 0, 0);
}