mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2025-01-04 09:15:05 +00:00
Kate: Don't use backward references at all. In Kate the back link field only advises which prior entry is still visible when the current entry is supposed to be shown. Matroska's block references have a different function: they tell the demuxer which prior packet(s) have to be decoded before the current packet can be decoded.
This commit is contained in:
parent
ed05a12209
commit
4537327091
@ -88,15 +88,12 @@ kate_packetizer_c::process(packet_cptr packet) {
|
||||
|
||||
int64_t start_time = get_uint64_le(packet->data->get() + 1);
|
||||
int64_t duration = get_uint64_le(packet->data->get() + 1 + sizeof(int64_t));
|
||||
int64_t backlink = get_uint64_le(packet->data->get() + 1 + sizeof(int64_t) * 2);
|
||||
|
||||
double scaled_timecode = start_time * (double)kate_id.gden / (double)kate_id.gnum;
|
||||
double scaled_duration = duration * (double)kate_id.gden / (double)kate_id.gnum;
|
||||
double scaled_backlink = (start_time - backlink) * (double)kate_id.gden / (double)kate_id.gnum;
|
||||
double scaled_timecode = start_time * (double)kate_id.gden / (double)kate_id.gnum;
|
||||
double scaled_duration = duration * (double)kate_id.gden / (double)kate_id.gnum;
|
||||
|
||||
packet->timecode = (int64_t)(scaled_timecode * 1000000000ll);
|
||||
packet->duration = (int64_t)(scaled_duration * 1000000000ll);
|
||||
packet->bref = backlink ? (int64_t)(scaled_backlink * 1000000000ll) : -1;
|
||||
packet->timecode = (int64_t)(scaled_timecode * 1000000000ll);
|
||||
packet->duration = (int64_t)(scaled_duration * 1000000000ll);
|
||||
packet->duration_mandatory = true;
|
||||
packet->gap_following = true;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user