summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorphintuka <phintuka>2006-10-27 23:02:02 +0000
committerphintuka <phintuka>2006-10-27 23:02:02 +0000
commit5981e2095d520c41989f50454e48425302033d0f (patch)
tree465c3c69cd7bc7d5ae6206d8943eca92a851ab22
parentc92db7ea76f9332f8857791e6dd555ca28c0db30 (diff)
downloadxineliboutput-5981e2095d520c41989f50454e48425302033d0f.tar.gz
xineliboutput-5981e2095d520c41989f50454e48425302033d0f.tar.bz2
Fixed pes_change_pts
-rw-r--r--tools/pes.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/tools/pes.h b/tools/pes.h
index f5951222..a638a58b 100644
--- a/tools/pes.h
+++ b/tools/pes.h
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: pes.h,v 1.3 2006-10-23 19:01:49 phintuka Exp $
+ * $Id: pes.h,v 1.4 2006-10-27 23:02:02 phintuka Exp $
*
*/
@@ -48,7 +48,6 @@
#define P_FRAME 2
#define B_FRAME 3
-
//
// Extract PTS from PES packet
//
@@ -98,11 +97,11 @@ static inline void pes_change_pts(uchar *Data, int Length, int64_t pts)
return;
if((Length > 14) && (Data[7] & 0x80)) { /* pts avail */
- Data[ 9] |= ((pts >> 29) & 0x0E);
- Data[10] |= ((pts >> 22) & 0xFF);
- Data[11] |= ((pts >> 14) & 0xFE);
- Data[12] |= ((pts >> 7 ) & 0xFF);
- Data[13] |= ((pts << 1 ) & 0xFE);
+ Data[ 9] = ((pts >> 29) & 0x0E) | (Data[ 9] & 0xf1);
+ Data[10] = ((pts >> 22) & 0xFF);
+ Data[11] = ((pts >> 14) & 0xFE) | (Data[11] & 0x01);
+ Data[12] = ((pts >> 7 ) & 0xFF);
+ Data[13] = ((pts << 1 ) & 0xFE) | (Data[13] & 0x01);
}
}
}