[Xineliboutput-cvslog] vdr-xineliboutput xine_input_vdr.c, 1.82, 1.83
Brought to you by:
phintuka
From: Petri H. <phi...@us...> - 2007-05-30 07:05:37
|
Update of /cvsroot/xineliboutput/vdr-xineliboutput In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv27558 Modified Files: xine_input_vdr.c Log Message: Fixed pes_strip_pts (packet and header lengths were not updated) Index: xine_input_vdr.c =================================================================== RCS file: /cvsroot/xineliboutput/vdr-xineliboutput/xine_input_vdr.c,v retrieving revision 1.82 retrieving revision 1.83 diff -u -d -r1.82 -r1.83 --- xine_input_vdr.c 17 May 2007 17:36:26 -0000 1.82 +++ xine_input_vdr.c 30 May 2007 07:05:36 -0000 1.83 @@ -894,11 +894,16 @@ static void pes_strip_pts(uint8_t *buf, int size) { if(size > 13 && buf[7] & 0x80) { /* pts avail */ + int pes_len = (buf[4] << 8) | buf[5]; if ((buf[6] & 0xC0) != 0x80) return; if ((buf[6] & 0x30) != 0) return; - buf[7] &= ~0x80; /* clear pts flag */ + pes_len -= 5; /* update packet len */ + buf[4] = pes_len >> 8; /* packet len (hi) */ + buf[5] = pes_len & 0xff; /* packet len (lo) */ + buf[7] &= 0x7f; /* clear pts flag */ + buf[8] -= 5; /* update header len */ memmove(buf+9, buf+14, size-14); } } @@ -1416,6 +1421,7 @@ buf->content = buf->mem; buf->size = 0; buf->type = BUF_DEMUX_BLOCK; + buf->pts = 0; buf->free_buffer = buffer_pool_free; } |