summaryrefslogtreecommitdiff
path: root/libavformat/matroska.h
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2016-10-15 18:01:50 -0300
committerJames Almer <jamrial@gmail.com>2016-10-15 20:42:07 -0300
commitbad8bbc26aa3151c734daa9568b14c2c7d9aa6d2 (patch)
tree7fd01f7d28839d19258dffb3a3d4c442f88c6628 /libavformat/matroska.h
parent8e53c1567c7ac2185408f68c1bbf117ab96edabe (diff)
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.h8
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
*/