Skip to content

Commit

Permalink
Merge pull request #35 from lars18th/fix-null-padding
Browse files Browse the repository at this point in the history
Set a correct Adaptation Field Control value for pid 1FFF
  • Loading branch information
gfto authored Mar 13, 2024
2 parents 6a59e47 + 64d1a50 commit 4db0d3f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion output_write.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,10 @@ void ts_frame_process(CONFIG *conf, OUTPUT *o, uint8_t *data) {
ts_packet = data + i;
pid = ts_packet_get_pid(ts_packet);

if (pid == 0x1fff) // NULL packet
if (pid == 0x1fff) { // NULL packet
ts_packet[3] = 0x10; // set no adaptation field, payload only
o->padding_period += TS_PACKET_SIZE;
}

if (ts_packet_has_pcr(ts_packet)) {
uint64_t pcr = ts_packet_get_pcr(ts_packet); // Current PCR
Expand Down

0 comments on commit 4db0d3f

Please sign in to comment.