MPEG 4p10: convert slice NALUs to RBSP before parsing

All NALUs must be converted to RBSP before they're parsed. Otherwise the
wrong values will be used resulting in e.g. wrong picture order and
therefore in wrong timestamps.

Fixes #918 and #1548.
This commit is contained in:
Moritz Bunkus 2015-12-28 13:44:44 +01:00
parent c5cba6f9e3
commit dee0280200
4 changed files with 11 additions and 1 deletions

View File

@ -1,5 +1,9 @@
2015-12-28 Moritz Bunkus <moritz@bunkus.org>
* mkvmerge: bug fix: the h.264 code wasn't converting slice NALUs
to RBSP form before parsing it resulting in wrongly timestamped
frames under certain conditions. Fixes #918 and #1548.
* mkvmerge: bug fix: the MP4 reader can now understand the 'random
access point' sample grouping information for marking open GOP
random access points as key frames. Fixes #1543.

View File

@ -1188,7 +1188,7 @@ mpeg4::p10::avc_es_parser_c::handle_slice_nalu(memory_cptr const &nalu) {
}
slice_info_t si;
if (!parse_slice(nalu, si))
if (!parse_slice(nalu_to_rbsp(nalu), si))
return;
if (m_have_incomplete_frame && flush_decision(si, m_incomplete_frame.m_si))

View File

@ -362,3 +362,4 @@ T_513vp9_10bit_key_frame_detection:9eab6e85ec792dcf670873d70a87f6ea:passed:20151
T_514remove_track_statistics_tags_during_remux:43d4c0ec5cbbc31018715e62a99377df-afe190e36be530592fe3b83fb28d3e69-a7f246fe02132a1fb9cd3d7d0f85f180:passed:20151215-134129:1.426290351
T_515aac_sampling_frequency_8000_is_not_sbr:b8f857faf759eae5362fefbb7cbeed23:passed:20151219-130357:0.066237884
T_516hevc_rap_sample_grouping:bb42041df575edd35f36d47aebc341a7:passed:20151228-124607:0.066873869
T_517h264_forbidden_byte_sequence_in_slice_nalu:74e0fb1a25397078335c6d94974dc168:passed:20151228-134333:3.276176597

View File

@ -0,0 +1,5 @@
#!/usr/bin/ruby -w
# T_517h264_forbidden_byte_sequence_in_slice_nalu
describe "mkvmerge / h.264 slices with forbidden byte value requiring NALU-to-RBSP conversion"
test_merge "data/h264/forbidden_byte_sequence_in_slice_header.h264"