From 324f8c7f3cf595b1a6be87c44739c41b2d5f5d8f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 22 Oct 2018 12:21:54 +0100 Subject: [PATCH] qtmux: Correctly set tkhd width/height to the display size It was previously set to the display aspect ratio, e.g. 4x3, 16x9, etc. but should be set to the display size. This is a regression from e655d47dfce1652630fe8ff5fb6be56370087004 (1.5.1) and was correct before that. https://bugzilla.gnome.org/show_bug.cgi?id=797318 --- gst/isomp4/atoms.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/gst/isomp4/atoms.c b/gst/isomp4/atoms.c index 8e53eab..360e411 100644 --- a/gst/isomp4/atoms.c +++ b/gst/isomp4/atoms.c @@ -4349,11 +4349,8 @@ atom_trak_set_video_type (AtomTRAK * trak, AtomsContext * context, /* ISO file spec says track header w/h indicates track's visual presentation * (so this together with pixels w/h implicitly defines PAR) */ if (par_n && (context->flavor != ATOMS_TREE_FLAVOR_MOV)) { - /* Assumes square pixels display */ - if (!gst_video_calculate_display_ratio (&dwidth, &dheight, entry->width, - entry->height, par_n, par_d, 1, 1)) { - GST_WARNING ("Could not calculate display ratio"); - } + dwidth = entry->width * par_n / par_d; + dheight = entry->height; } atom_trak_set_video_commons (trak, context, scale, dwidth, dheight); -- 2.7.4