mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2024-12-26 04:42:04 +00:00
Force a default size of 4 for the display width/height so that future changes of the AR will not have to rewrite the complete file.
This commit is contained in:
parent
d9329f351a
commit
ecbe3f456e
@ -299,19 +299,25 @@ void generic_packetizer_c::set_headers() {
|
||||
*(static_cast<EbmlUInteger *>
|
||||
(&GetChild<KaxVideoPixelHeight>(video))) = hvideo_pixel_height;
|
||||
if ((ti->aspect_ratio != 1.0) &&
|
||||
((hvideo_pixel_width / hvideo_pixel_height) != ti->aspect_ratio))
|
||||
*(static_cast<EbmlUInteger *>
|
||||
(&GetChild<KaxVideoDisplayHeight>(video))) = hvideo_pixel_height;
|
||||
((hvideo_pixel_width / hvideo_pixel_height) != ti->aspect_ratio)) {
|
||||
KaxVideoDisplayHeight &dheight =
|
||||
GetChild<KaxVideoDisplayHeight>(video);
|
||||
*(static_cast<EbmlUInteger *>(&dheight)) = hvideo_pixel_height;
|
||||
dheight.SetDefaultSize(4);
|
||||
}
|
||||
}
|
||||
|
||||
if (hvideo_pixel_width != -1) {
|
||||
*(static_cast<EbmlUInteger *>
|
||||
(&GetChild<KaxVideoPixelWidth>(video))) = hvideo_pixel_width;
|
||||
if ((ti->aspect_ratio != 1.0) &&
|
||||
((hvideo_pixel_width / hvideo_pixel_height) != ti->aspect_ratio))
|
||||
*(static_cast<EbmlUInteger *>
|
||||
(&GetChild<KaxVideoDisplayWidth>(video))) =
|
||||
((hvideo_pixel_width / hvideo_pixel_height) != ti->aspect_ratio)) {
|
||||
KaxVideoDisplayWidth &dwidth =
|
||||
GetChild<KaxVideoDisplayWidth>(video);
|
||||
*(static_cast<EbmlUInteger *>(&dwidth)) =
|
||||
(uint64_t)(hvideo_pixel_height * ti->aspect_ratio);
|
||||
dwidth.SetDefaultSize(4);
|
||||
}
|
||||
}
|
||||
|
||||
} else if (htrack_type == track_audio) {
|
||||
|
Loading…
Reference in New Issue
Block a user