X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Fmovenc.c;h=3b4e3b519c202f12fe88df65c06d16e985990a6c;hb=ddef3d902f0e4cbd6be6b3e5df7ec158ce51488b;hp=11b26708aec4299e730dc990f942d422993d51c3;hpb=b12693facf991f343cdf310690f59f69143b256f;p=ffmpeg diff --git a/libavformat/movenc.c b/libavformat/movenc.c index 11b26708aec..3b4e3b519c2 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); }