qtmux: Correctly set tkhd width/height to the display size
authorSebastian Dröge <sebastian@centricular.com>
Mon, 22 Oct 2018 11:21:54 +0000 (12:21 +0100)
committerSebastian Dröge <sebastian@centricular.com>
Mon, 22 Oct 2018 11:23:05 +0000 (12:23 +0100)
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

index 8e53eab..360e411 100644 (file)
@@ -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);