mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2024-12-26 12:53:50 +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 *>
|
*(static_cast<EbmlUInteger *>
|
||||||
(&GetChild<KaxVideoPixelHeight>(video))) = hvideo_pixel_height;
|
(&GetChild<KaxVideoPixelHeight>(video))) = hvideo_pixel_height;
|
||||||
if ((ti->aspect_ratio != 1.0) &&
|
if ((ti->aspect_ratio != 1.0) &&
|
||||||
((hvideo_pixel_width / hvideo_pixel_height) != ti->aspect_ratio))
|
((hvideo_pixel_width / hvideo_pixel_height) != ti->aspect_ratio)) {
|
||||||
*(static_cast<EbmlUInteger *>
|
KaxVideoDisplayHeight &dheight =
|
||||||
(&GetChild<KaxVideoDisplayHeight>(video))) = hvideo_pixel_height;
|
GetChild<KaxVideoDisplayHeight>(video);
|
||||||
|
*(static_cast<EbmlUInteger *>(&dheight)) = hvideo_pixel_height;
|
||||||
|
dheight.SetDefaultSize(4);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hvideo_pixel_width != -1) {
|
if (hvideo_pixel_width != -1) {
|
||||||
*(static_cast<EbmlUInteger *>
|
*(static_cast<EbmlUInteger *>
|
||||||
(&GetChild<KaxVideoPixelWidth>(video))) = hvideo_pixel_width;
|
(&GetChild<KaxVideoPixelWidth>(video))) = hvideo_pixel_width;
|
||||||
if ((ti->aspect_ratio != 1.0) &&
|
if ((ti->aspect_ratio != 1.0) &&
|
||||||
((hvideo_pixel_width / hvideo_pixel_height) != ti->aspect_ratio))
|
((hvideo_pixel_width / hvideo_pixel_height) != ti->aspect_ratio)) {
|
||||||
*(static_cast<EbmlUInteger *>
|
KaxVideoDisplayWidth &dwidth =
|
||||||
(&GetChild<KaxVideoDisplayWidth>(video))) =
|
GetChild<KaxVideoDisplayWidth>(video);
|
||||||
|
*(static_cast<EbmlUInteger *>(&dwidth)) =
|
||||||
(uint64_t)(hvideo_pixel_height * ti->aspect_ratio);
|
(uint64_t)(hvideo_pixel_height * ti->aspect_ratio);
|
||||||
|
dwidth.SetDefaultSize(4);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (htrack_type == track_audio) {
|
} else if (htrack_type == track_audio) {
|
||||||
|
Loading…
Reference in New Issue
Block a user