mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2024-12-23 19:31:44 +00:00
Also fix the BITMAPINFOHEADER with the new pixel dimenions after getting them from the bitstream. Added a test case for this feature.
This commit is contained in:
parent
1f376290a2
commit
d338c5dd12
@ -684,6 +684,13 @@ mpeg4_p2_video_packetizer_c::extract_size(const unsigned char *buffer,
|
||||
if ((width != hvideo_pixel_width) || (height != hvideo_pixel_height)) {
|
||||
set_video_pixel_width(width);
|
||||
set_video_pixel_height(height);
|
||||
if (!output_is_native &&
|
||||
(ti.private_size >= sizeof(alBITMAPINFOHEADER))) {
|
||||
alBITMAPINFOHEADER *bih = (alBITMAPINFOHEADER *)ti.private_data;
|
||||
put_uint32_le(&bih->bi_width, width);
|
||||
put_uint32_le(&bih->bi_height, height);
|
||||
set_codec_private(ti.private_data, ti.private_size);
|
||||
}
|
||||
generic_packetizer_c::set_headers();
|
||||
rerender_track_headers();
|
||||
mxinfo("Track %lld of '%s': The extracted values for video width and "
|
||||
|
@ -59,3 +59,4 @@ T_209ac3misdeetected_as_mpeges:4ba8d5b8e4e847c5f74ca58f69ad3c69:passed:20050315-
|
||||
T_210splitting_and_chapters:1b7f8527b18911d49a1be6d1a06facd1-94ff3b0066760b32fd6a270daa9f5fca-509fabbe60c9520b6551b4fe27cd7bd5-c7a9564d80552c041177a0ed2661df28:passed:20050406-165104
|
||||
T_211bug_segfault_reading_mp4:c6f3431d945dd85c766b4e68085ec270:passed:20050728-083402
|
||||
T_212ssa_attachments:39c5b51454faea3ba07a7e6f61c52796-9a5a5ed80808c9d448ca5b44b640d8aa-c9a562c38a809df96ba6bd78220bb930-6ee73fb6f296ec5a9d9322c8ec556bc3-eda62b7022283f6ea28f28833331b00d:passed:20050824-131320
|
||||
T_213mp4_broken_pixel_dimensions:a39778c6feb6144d7035b7556042e85f:passed:20050919-094831
|
||||
|
13
tests/test-213mp4_broken_pixel_dimensions.rb
Normal file
13
tests/test-213mp4_broken_pixel_dimensions.rb
Normal file
@ -0,0 +1,13 @@
|
||||
#!/usr/bin/ruby -w
|
||||
|
||||
class T_213mp4_broken_pixel_dimensions < Test
|
||||
def description
|
||||
return "mkvmerge / MP4 with wrong pixel dimensions / in(MP4)"
|
||||
end
|
||||
|
||||
def run
|
||||
merge("data/mp4/P4230041.MP4")
|
||||
return hash_tmp
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user