X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=cmdutils.c;h=3d428f3eea8a90dc6f753520cab7ad545d5c524b;hb=ddef3d902f0e4cbd6be6b3e5df7ec158ce51488b;hp=2373dbf841705a6fb69bdd817d3999640c25f8ca;hpb=b12693facf991f343cdf310690f59f69143b256f;p=ffmpeg diff --git a/cmdutils.c b/cmdutils.c index 2373dbf8417..3d428f3eea8 100644 --- a/cmdutils.c +++ b/cmdutils.c @@ -2097,18 +2097,10 @@ void *grow_array(void *array, int elem_size, int *size, int new_size) double get_rotation(AVStream *st) { - AVDictionaryEntry *rotate_tag = av_dict_get(st->metadata, "rotate", NULL, 0); uint8_t* displaymatrix = av_stream_get_side_data(st, AV_PKT_DATA_DISPLAYMATRIX, NULL); double theta = 0; - - if (rotate_tag && *rotate_tag->value && strcmp(rotate_tag->value, "0")) { - char *tail; - theta = av_strtod(rotate_tag->value, &tail); - if (*tail) - theta = 0; - } - if (displaymatrix && !theta) + if (displaymatrix) theta = -av_display_rotation_get((int32_t*) displaymatrix); theta -= 360*floor(theta/360 + 0.9/360);