diff options
author | James Almer <jamrial@gmail.com> | 2016-10-15 18:01:50 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2016-10-15 20:42:07 -0300 |
commit | bad8bbc26aa3151c734daa9568b14c2c7d9aa6d2 (patch) | |
tree | 7fd01f7d28839d19258dffb3a3d4c442f88c6628 /libavformat/matroska.h | |
parent | 8e53c1567c7ac2185408f68c1bbf117ab96edabe (diff) | |
download | ffmpeg-bad8bbc26aa3151c734daa9568b14c2c7d9aa6d2.tar.gz |
avformat/matroskadec: set aspect ratio only when DisplayWidth and DisplayHeight are in pixels
A missing DisplayUnit element or one with the default value of 0 means
DisplayWidth and DisplayHeight should be interpreted as pixels.
The current code setting st->sample_aspect_ratio is wrong when DisplayUnit
is anything else.
Reviewed-by: Carl Eugen Hoyos <ceffmpeg@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavformat/matroska.h')
-rw-r--r-- | libavformat/matroska.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libavformat/matroska.h b/libavformat/matroska.h index 15e401c3d3..8ad89da2de 100644 --- a/libavformat/matroska.h +++ b/libavformat/matroska.h @@ -309,6 +309,14 @@ typedef enum { MATROSKA_VIDEO_STEREOMODE_TYPE_NB, } MatroskaVideoStereoModeType; +typedef enum { + MATROSKA_VIDEO_DISPLAYUNIT_PIXELS = 0, + MATROSKA_VIDEO_DISPLAYUNIT_CENTIMETERS = 1, + MATROSKA_VIDEO_DISPLAYUNIT_INCHES = 2, + MATROSKA_VIDEO_DISPLAYUNIT_DAR = 3, + MATROSKA_VIDEO_DISPLAYUNIT_UNKNOWN = 4, +} MatroskaVideoDisplayUnit; + /* * Matroska Codec IDs, strings */ |