mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2024-12-24 20:01:53 +00:00
Changed some flags to make mkvextract's output more compatible with RealProducer's.
This commit is contained in:
parent
3592e77e70
commit
47d8afd3c0
@ -582,6 +582,7 @@ unpack_real_video_frames(kax_track_t *track,
|
||||
uint32_t timecode,
|
||||
bool is_key) {
|
||||
unsigned char *src_ptr, *ptr, *dst;
|
||||
uint32_t merged;
|
||||
int num_subpackets, i, offset, total_len;
|
||||
vector<uint32_t> packet_offsets, packet_lengths;
|
||||
rmff_frame_t *frame;
|
||||
@ -619,26 +620,30 @@ unpack_real_video_frames(kax_track_t *track,
|
||||
if (num_subpackets == 1) {
|
||||
*ptr = 0xc1; // complete frame
|
||||
ptr++;
|
||||
// merged = 0x8000;
|
||||
merged = 0x0000;
|
||||
|
||||
} else {
|
||||
*ptr = num_subpackets + 1;
|
||||
// *ptr = num_subpackets;
|
||||
*ptr = 1;
|
||||
if (i == (num_subpackets - 1)) // last fragment?
|
||||
*ptr |= 0x80;
|
||||
ptr++;
|
||||
|
||||
*ptr = i + 1; // fragment number
|
||||
if (is_key) // key frame?
|
||||
*ptr |= 0x80;
|
||||
// if (is_key) // key frame?
|
||||
// *ptr |= 0x80;
|
||||
ptr++;
|
||||
merged = 0;
|
||||
}
|
||||
|
||||
// total packet length:
|
||||
if (total_len > 0x3fff) {
|
||||
put_uint16_be(ptr, ((total_len & 0x3fff0000) >> 16));
|
||||
put_uint16_be(ptr, merged | ((total_len & 0x3fff0000) >> 16));
|
||||
ptr += 2;
|
||||
put_uint16_be(ptr, total_len & 0x0000ffff);
|
||||
} else
|
||||
put_uint16_be(ptr, 0x4000 | total_len);
|
||||
put_uint16_be(ptr, merged | 0x4000 | total_len);
|
||||
ptr += 2;
|
||||
|
||||
// fragment offset from beginning/end:
|
||||
@ -659,7 +664,7 @@ unpack_real_video_frames(kax_track_t *track,
|
||||
ptr += 2;
|
||||
|
||||
// sequence number = frame number & 0xff
|
||||
*ptr = track->packetno & 0xff;
|
||||
*ptr = (track->packetno - 1) & 0xff;
|
||||
ptr++;
|
||||
|
||||
memcpy(ptr, src_ptr, packet_lengths[i]);
|
||||
|
Loading…
Reference in New Issue
Block a user