Changeset cf70ba37 in ffmpeg


Ignore:
Timestamp:
Jan 14, 2015, 4:17:23 PM (10 years ago)
Author:
Vittorio Giovara <vittorio.giovara@gmail.com>
Branches:
master
Children:
89b6382, e2ad0b66
Parents:
1e763454
git-author:
Vittorio Giovara <vittorio.giovara@gmail.com> (01/09/15 10:24:22)
git-committer:
Vittorio Giovara <vittorio.giovara@gmail.com> (01/14/15 16:17:23)
Message:

mov: Check angle rather than full matrix when updating SAR

When the display matrix is not the identity one, but the rotation angle
is zero, there is no need to update the sample aspect ratio.

Otherwise, it is possible to obtain negative values which interferes
with transcoding in later stages. This kind of behaviour is reproducible
on mov files with "major_brand: MSNV".

CC: libav-stable@libav.org
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libavformat/mov.c

    r1e763454 rcf70ba37  
    3636#include "libavutil/avstring.h"
    3737#include "libavutil/dict.h"
     38#include "libavutil/display.h"
    3839#include "libavutil/opt.h"
    3940#include "libavcodec/ac3tab.h"
     
    25792580
    25802581    // transform the display width/height according to the matrix
    2581     // skip this if the display matrix is the default identity matrix
    2582     // or if it is rotating the picture, ex iPhone 3GS
     2582    // skip this if the rotation angle is 0 degrees
    25832583    // to keep the same scale, use [width height 1<<16]
    2584     if (width && height &&
    2585         ((display_matrix[0][0] != 65536  ||
    2586           display_matrix[1][1] != 65536) &&
    2587          !display_matrix[0][1] &&
    2588          !display_matrix[1][0] &&
    2589          !display_matrix[2][0] && !display_matrix[2][1])) {
     2584    if (width && height && sc->display_matrix &&
     2585        av_display_rotation_get(sc->display_matrix) != 0.0f) {
    25902586        for (i = 0; i < 2; i++)
    25912587            disp_transform[i] =
Note: See TracChangeset for help on using the changeset viewer.