mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2024-12-29 14:27:42 +00:00
Cosmetics
This commit is contained in:
parent
858536a516
commit
a38d57d3ff
@ -149,42 +149,37 @@ xtr_vobsub_c::handle_frame(memory_cptr &frame,
|
||||
|
||||
memset(&ps, 0, sizeof(mpeg_ps_header_t));
|
||||
|
||||
ps.pfx[2] = 0x01;
|
||||
ps.pfx[3] = 0xba;
|
||||
c = timecode * 9 / 100000;
|
||||
|
||||
ps.scr[0] = 0x40 | ((uint8_t)(c >> 27) & 0x38) | 0x04 |
|
||||
((uint8_t)(c >> 28) & 0x03);
|
||||
ps.scr[1] = (uint8_t)(c >> 20);
|
||||
ps.scr[2] = ((uint8_t)(c >> 12) & 0xf8) | 0x04 |
|
||||
((uint8_t)(c >> 13) & 0x03);
|
||||
ps.scr[3] = (uint8_t)(c >> 5);
|
||||
ps.scr[4] = ((uint8_t)(c << 3) & 0xf8) | 0x04;
|
||||
ps.scr[5] = 1;
|
||||
ps.pfx[2] = 0x01;
|
||||
ps.pfx[3] = 0xba;
|
||||
ps.scr[0] = 0x40 | ((uint8_t)(c >> 27) & 0x38) | 0x04 | ((uint8_t)(c >> 28) & 0x03);
|
||||
ps.scr[1] = (uint8_t)(c >> 20);
|
||||
ps.scr[2] = ((uint8_t)(c >> 12) & 0xf8) | 0x04 | ((uint8_t)(c >> 13) & 0x03);
|
||||
ps.scr[3] = (uint8_t)(c >> 5);
|
||||
ps.scr[4] = ((uint8_t)(c << 3) & 0xf8) | 0x04;
|
||||
ps.scr[5] = 1;
|
||||
ps.muxr[0] = 1;
|
||||
ps.muxr[1] = 0x89;
|
||||
ps.muxr[2] = 0xc3; // just some value
|
||||
ps.stlen = 0xf8;
|
||||
ps.stlen = 0xf8;
|
||||
if ((padding < 8) && (first == size))
|
||||
ps.stlen |= (uint8_t)padding;
|
||||
|
||||
memset(&es, 0, sizeof(mpeg_es_header_t));
|
||||
es.pfx[2] = 1;
|
||||
es.pfx[2] = 1;
|
||||
es.stream_id = 0xbd;
|
||||
es.len[0] = (uint8_t)((first + 9) >> 8);
|
||||
es.len[1] = (uint8_t)(first + 9);
|
||||
es.flags[0] = 0x81;
|
||||
es.flags[1] = 0x80;
|
||||
es.hlen = 5;
|
||||
es.pts[0] = 0x20 | ((uint8_t)(c >> 29) & 0x0e) | 0x01;
|
||||
es.pts[1] = (uint8_t)(c >> 22);
|
||||
es.pts[2] = ((uint8_t)(c >> 14) & 0xfe) | 0x01;
|
||||
es.pts[3] = (uint8_t)(c >> 7);
|
||||
es.pts[4] = (uint8_t)(c << 1) | 0x01;
|
||||
if (NULL == master)
|
||||
es.lidx = 0x20;
|
||||
else
|
||||
es.lidx = stream_id;
|
||||
es.len[0] = (uint8_t)((first + 9) >> 8);
|
||||
es.len[1] = (uint8_t)(first + 9);
|
||||
es.flags[0] = 0x81;
|
||||
es.flags[1] = 0x80;
|
||||
es.hlen = 5;
|
||||
es.pts[0] = 0x20 | ((uint8_t)(c >> 29) & 0x0e) | 0x01;
|
||||
es.pts[1] = (uint8_t)(c >> 22);
|
||||
es.pts[2] = ((uint8_t)(c >> 14) & 0xfe) | 0x01;
|
||||
es.pts[3] = (uint8_t)(c >> 7);
|
||||
es.pts[4] = (uint8_t)(c << 1) | 0x01;
|
||||
es.lidx = NULL == master ? 0x20 : stream_id;
|
||||
|
||||
vmaster->out->write(&ps, sizeof(mpeg_ps_header_t));
|
||||
if ((padding > 0) && (padding < 8) && (first == size))
|
||||
|
Loading…
Reference in New Issue
Block a user