Advertisement
Guest User

Untitled

a guest
Jun 24th, 2014
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. diff --git a/src/muxer/muxer_pass.c b/src/muxer/muxer_pass.c
  2. index 906099a..a85056d 100644
  3. --- a/src/muxer/muxer_pass.c
  4. +++ b/src/muxer/muxer_pass.c
  5. @@ -43,6 +43,7 @@ typedef struct pass_muxer {
  6.  
  7. /* TS muxing */
  8. uint8_t pm_pat_cc;
  9. + uint32_t pm_pat_sequence;
  10. uint16_t pm_pmt_pid;
  11. uint8_t pm_pmt_cc;
  12. uint8_t *pm_pmt;
  13. @@ -264,7 +265,13 @@ pass_muxer_rewrite_pat(pass_muxer_t* pm, unsigned char* tsb)
  14.  
  15. pass_muxer_append_crc32(tsb+5, 12, 183);
  16.  
  17. - memset(tsb + 21, 0xff, 167); /* Wipe rest of packet */
  18. + tsb[21] = (pm->pm_pat_sequence >> 24) & 0xff;
  19. + tsb[22] = (pm->pm_pat_sequence >> 16) & 0xff;
  20. + tsb[23] = (pm->pm_pat_sequence >> 8) & 0xff;
  21. + tsb[24] = pm->pm_pat_sequence & 0xff;
  22. + pm->pm_pat_sequence++;
  23. +
  24. + memset(tsb + 25, 0xff, 163); /* Wipe rest of packet */
  25.  
  26. return 0;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement