From 1e646472e7fde7e3668d1f1fafa134de34c98c80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 5 Jul 2017 13:52:25 +0300 Subject: [PATCH] mxfmetadata: Use display width/height instead of stored width/height Stored values contain padding and alignment, and should only be used as fallback if neither display values nor sampled values exist. --- gst/mxf/mxfmetadata.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gst/mxf/mxfmetadata.c b/gst/mxf/mxfmetadata.c index 0fbc11e1da..8f095926b6 100644 --- a/gst/mxf/mxfmetadata.c +++ b/gst/mxf/mxfmetadata.c @@ -4949,6 +4949,14 @@ void mxf_metadata_generic_picture_essence_descriptor_set_caps width = self->stored_width; height = self->stored_height; + if (self->sampled_width && self->sampled_height) { + width = self->sampled_width; + height = self->sampled_height; + } + if (self->display_width && self->display_height) { + width = self->display_width; + height = self->display_height; + } /* If the video is stored as separate fields the * height is only the height of one field, i.e.