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.
This commit is contained in:
Sebastian Dröge 2017-07-05 13:52:25 +03:00
parent 37e0439e84
commit 1e646472e7

View file

@ -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.