diff options
author | phintuka <phintuka> | 2008-05-07 15:16:48 +0000 |
---|---|---|
committer | phintuka <phintuka> | 2008-05-07 15:16:48 +0000 |
commit | e57a6461ce51bc79e64d4276cdfcd542953b3261 (patch) | |
tree | 3cddc05636508cd36640674f46c51c53511a9b7c | |
parent | a306d06d18f7d90db2f5569054a411695c5e18ab (diff) | |
download | xineliboutput-e57a6461ce51bc79e64d4276cdfcd542953b3261.tar.gz xineliboutput-e57a6461ce51bc79e64d4276cdfcd542953b3261.tar.bz2 |
Fix min. length of pes packet with pts
-rw-r--r-- | tools/pes.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/pes.c b/tools/pes.c index 2845bf07..29dd334d 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.2 2008-02-04 23:49:50 phintuka Exp $ + * $Id: pes.c,v 1.3 2008-05-07 15:16:48 phintuka Exp $ * */ @@ -24,7 +24,7 @@ int64_t pes_get_pts(const uint8_t *buf, int len) if ((buf[6] & 0x30) != 0) return INT64_C(-1); - if ((len > 14) && (buf[7] & 0x80)) { /* pts avail */ + if ((len > 13) && (buf[7] & 0x80)) { /* pts avail */ int64_t pts; pts = ((int64_t)(buf[ 9] & 0x0E)) << 29 ; pts |= ((int64_t) buf[10]) << 22 ; @@ -69,7 +69,7 @@ void pes_change_pts(uint8_t *buf, int len, int64_t new_pts) if ((buf[6] & 0x30) != 0) return; - if ((len > 14) && (buf[7] & 0x80)) { /* pts avail */ + if ((len > 13) && (buf[7] & 0x80)) { /* pts avail */ buf[ 9] = ((new_pts >> 29) & 0x0E) | (buf[ 9] & 0xf1); buf[10] = ((new_pts >> 22) & 0xFF); buf[11] = ((new_pts >> 14) & 0xFE) | (buf[11] & 0x01); |