summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorphintuka <phintuka>2008-07-29 14:09:05 +0000
committerphintuka <phintuka>2008-07-29 14:09:05 +0000
commit21e17ffb6890c1d45a5fe98cf362033af9fe7e83 (patch)
tree42e15de8142b0116e83115e432a6424242ade88b
parentf9b24952f87b96f53801bfb499a78cdcfe23e87c (diff)
downloadxineliboutput-21e17ffb6890c1d45a5fe98cf362033af9fe7e83.tar.gz
xineliboutput-21e17ffb6890c1d45a5fe98cf362033af9fe7e83.tar.bz2
Fixed pes_strip_pts_dts
(DTS flag was not cleared and header length was updated incorrectly)
-rw-r--r--tools/pes.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/pes.c b/tools/pes.c
index b205dabc..2e75c116 100644
--- a/tools/pes.c
+++ b/tools/pes.c
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: pes.c,v 1.6 2008-07-29 14:03:26 phintuka Exp $
+ * $Id: pes.c,v 1.7 2008-07-29 14:09:05 phintuka Exp $
*
*/
@@ -94,8 +94,8 @@ int pes_strip_pts_dts(uint8_t *buf, int size)
pes_len -= n; /* 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 */
+ buf[7] &= 0x3f; /* clear pts and dts flags */
+ buf[8] -= n; /* update header len */
memmove(buf+4+n, buf+9+n, size-9-n);
return size - n;
}