subtitles: treat all frames as key frames

Fixes #2541.
This commit is contained in:
Moritz Bunkus 2019-04-17 15:54:46 +02:00
parent 3e8fa4b95e
commit d9c9b2498f
No known key found for this signature in database
GPG Key ID: 74AF00ADF2E32C85
8 changed files with 26 additions and 1 deletions

View File

@ -1,3 +1,11 @@
# Version ?
## Bug fixes
* mkvmerge: all subtitle frames are now treated as key frames in order to fix
wrong data in source files. Fixes #2541.
# Version 33.1.0 "Primrose" 2019-04-15
## Bug fixes

View File

@ -189,6 +189,13 @@ struct packet_t {
return has_duration() ? unmodified_duration : 0;
}
void
force_key_frame() {
bref = -1;
fref = -1;
key_flag = true;
}
bool
is_key_frame()
const {

View File

@ -46,6 +46,8 @@ dvbsub_packetizer_c::set_headers() {
int
dvbsub_packetizer_c::process(packet_cptr packet) {
packet->duration_mandatory = packet->duration >= 0;
packet->force_key_frame();
add_packet(packet);
return FILE_STATUS_MOREDATA;

View File

@ -47,6 +47,8 @@ hdmv_pgs_packetizer_c::set_headers() {
int
hdmv_pgs_packetizer_c::process(packet_cptr packet) {
packet->force_key_frame();
if (!m_aggregate_packets) {
dump_and_add_packet(packet);
return FILE_STATUS_MOREDATA;

View File

@ -65,6 +65,8 @@ hdmv_textst_packetizer_c::process(packet_cptr packet) {
packet->duration_mandatory = true;
packet->force_key_frame();
add_packet(packet);
return FILE_STATUS_MOREDATA;

View File

@ -87,6 +87,8 @@ kate_packetizer_c::process(packet_cptr packet) {
if (end > m_previous_timestamp)
m_previous_timestamp = end;
packet->force_key_frame();
add_packet(packet);
return FILE_STATUS_MOREDATA;

View File

@ -95,6 +95,8 @@ textsubs_packetizer_c::process(packet_cptr packet) {
packet->data = memory_c::clone(subs);
packet->force_key_frame();
if (0 <= packet->duration)
process_one_packet(packet);

View File

@ -499,7 +499,7 @@ T_650chapter_generation_no_names:65b6db53e376326e7e2f3d1c04caf63d-ok:passed:2018
T_651sync_chapter_timestamps:840ec2d37a993e2da78c51b05d7c80f0-96a2f405d04267a1d1e62da4d9521a10-809ab88c5f5d48cfaf5f9bcf94b310f5-809ab88c5f5d48cfaf5f9bcf94b310f5-e0869563706cd2a0b3ec8cb65d1d0cd0-6890c5bac2022d3624958b950d36c77e-6890c5bac2022d3624958b950d36c77e-3e619d7ec77e8395eda20d91382df5cc-822141ff77af0c4c4c7a889ec7374190-3cc5d932c804e0bb1808e63501ea3d1e-3cc5d932c804e0bb1808e63501ea3d1e-7b65c3ff93bf15ca36889d4d9cfda9c1-9a6595a1dbab62f1174c4056e0fdba5b-9a6595a1dbab62f1174c4056e0fdba5b-0621718db4ce9cb7ed4c8c5dc843a962-b276bee9b55fc8aa874608bc2863ba46-00f74b92df721cd1dc363deddc4cf6d8-00f74b92df721cd1dc363deddc4cf6d8-f5d087300a71d86b1ca57ab7929758ed-df9f1da488db25294f457e3576ed8a2d-df9f1da488db25294f457e3576ed8a2d-a5e0963d2fa4ed1dc6e4a57e81c6ef75-7f60d2a169cd162d1de5e5df2a191a8a-7f60d2a169cd162d1de5e5df2a191a8a-7f60d2a169cd162d1de5e5df2a191a8a-91cd9376b3245c3e23413889f66333a1-91cd9376b3245c3e23413889f66333a1-91cd9376b3245c3e23413889f66333a1:passed:20180918-223701:2.330201791
T_652quicktime_pcm_in24:7966b3aa89fe38edbf6767e72ec2f24f-true:passed:20181001-103254:0.148687125
T_653X_text_subtitles_without_duration:bb9a055d2fc4f01a4b78bb2c40457168:passed:20181005-185654:0.010177822
T_654text_subtitles_without_duration:ada9aaa1ae07ff6b20fb0618304d0820:passed:20181005-202509:0.012006837
T_654text_subtitles_without_duration:68b638163c83790cb3f9253f9824e0c6:passed:20181005-202509:0.012006837
T_655mpeg_ts_teletext_subs_long_gap_until_end_of_display:6027ec285e5c03ec7fa84afea1d57f56:passed:20181005-212927:0.513727609
T_656mpeg_ts_bad_utf8_in_service_names2:544606778297772ea61146bdbd8f1186:passed:20181006-122753:0.020246407
T_657av1_from_mp4:08895840fd959294a31f7cbba8b2d9dd:passed:20181007-220646:0.040201275