summaryrefslogtreecommitdiff
path: root/libavformat/matroskaenc.c
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2016-10-15 15:02:26 -0300
committerJames Almer <jamrial@gmail.com>2016-10-15 20:48:03 -0300
commit90826031a2051d42334c3227c96bb5b769f6e9f6 (patch)
tree2401fbe75db1476f337605a615a172299d41e547 /libavformat/matroskaenc.c
parentbad8bbc26aa3151c734daa9568b14c2c7d9aa6d2 (diff)
avformat/matroskaenc: write a DisplayUnit element when aspect ratio is unknown
We don't currently support values 1 (centimeters), 2 (inches) or 3 (DAR), only the default value 0 (pixels) which doesn't need to be written. The fate refs are updated as unknown SAR is now signaled in the output files with the addition of the new element. Reviewed-by: Carl Eugen Hoyos <ceffmpeg@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavformat/matroskaenc.c')
-rw-r--r--libavformat/matroskaenc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index a48f5bb3c6..6f2957c1c6 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -1197,7 +1197,8 @@ static int mkv_write_track(AVFormatContext *s, MatroskaMuxContext *mkv,
} else if (display_width_div != 1 || display_height_div != 1) {
put_ebml_uint(pb, MATROSKA_ID_VIDEODISPLAYWIDTH , par->width / display_width_div);
put_ebml_uint(pb, MATROSKA_ID_VIDEODISPLAYHEIGHT, par->height / display_height_div);
- }
+ } else
+ put_ebml_uint(pb, MATROSKA_ID_VIDEODISPLAYUNIT, MATROSKA_VIDEO_DISPLAYUNIT_UNKNOWN);
if (par->codec_id == AV_CODEC_ID_RAWVIDEO) {
uint32_t color_space = av_le2ne32(par->codec_tag);