mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2024-12-23 19:31:44 +00:00
Default display width/height to pixel width/height for video tracks read from Matroska files. Do not extract the AR from a MPEG-4 part 2 track if the display dimensions are given.
This commit is contained in:
parent
56703d4959
commit
1a378a21e7
10
ChangeLog
10
ChangeLog
@ -1,3 +1,13 @@
|
||||
2005-08-25 Moritz Bunkus <moritz@bunkus.org>
|
||||
|
||||
* mkvmerge: bug fix: If a Matroska file with a MPEG-4 part 2 video
|
||||
track was muxed into a Matroska file and the source file did not
|
||||
contain the display width/height elements for that track then the
|
||||
aspect ratio was extracted from the video data itself which
|
||||
clashes with the Matroska specs which say that display
|
||||
width/height default to the pixel width/height if they're not
|
||||
present.
|
||||
|
||||
2005-08-24 Moritz Bunkus <moritz@bunkus.org>
|
||||
|
||||
* mkvmerge: bug fix: Native MPEG-4 ASP storage was still bugged:
|
||||
|
@ -1060,14 +1060,16 @@ kax_reader_c::read_headers() {
|
||||
track->v_dwidth = uint64(*kv_dwidth);
|
||||
if (verbose > 1)
|
||||
mxinfo(PFX "| + Display width: %llu\n", track->v_dwidth);
|
||||
}
|
||||
} else
|
||||
track->v_dwidth = track->v_width;
|
||||
|
||||
kv_dheight = FINDFIRST(ktvideo, KaxVideoDisplayHeight);
|
||||
if (kv_dheight != NULL) {
|
||||
track->v_dheight = uint64(*kv_dheight);
|
||||
if (verbose > 1)
|
||||
mxinfo(PFX "| + Display height: %llu\n", track->v_dheight);
|
||||
}
|
||||
} else
|
||||
track->v_dheight = track->v_height;
|
||||
|
||||
// For older files.
|
||||
kv_frate = FINDFIRST(ktvideo, KaxVideoFrameRate);
|
||||
@ -2074,11 +2076,8 @@ kax_reader_c::identify() {
|
||||
if (tracks[i]->track_name != "")
|
||||
info += mxsprintf("track_name:%s ",
|
||||
escape(tracks[i]->track_name).c_str());
|
||||
if ((tracks[i]->v_dwidth != 0) && (tracks[i]->v_dheight != 0) &&
|
||||
((tracks[i]->v_dwidth != tracks[i]->v_width) ||
|
||||
(tracks[i]->v_dheight != tracks[i]->v_height)))
|
||||
info += mxsprintf("display_dimensions:%llux%llu ",
|
||||
tracks[i]->v_dwidth, tracks[i]->v_dheight);
|
||||
info += mxsprintf("display_dimensions:%llux%llu ",
|
||||
tracks[i]->v_dwidth, tracks[i]->v_dheight);
|
||||
info += mxsprintf("default_track:%u ",
|
||||
tracks[i]->default_track ? 1 : 0);
|
||||
info += "]";
|
||||
|
@ -202,6 +202,7 @@ mpeg1_2_video_packetizer_c(generic_reader_c *_reader,
|
||||
set_codec_id(mxsprintf("V_MPEG%d", _version));
|
||||
if (!ti.aspect_ratio_given && !ti.display_dimensions_given) {
|
||||
if ((_dwidth > 0) && (_dheight > 0)) {
|
||||
aspect_ratio_extracted = true;
|
||||
ti.display_dimensions_given = true;
|
||||
ti.display_width = _dwidth;
|
||||
ti.display_height = _dheight;
|
||||
|
Loading…
Reference in New Issue
Block a user