From e57a6461ce51bc79e64d4276cdfcd542953b3261 Mon Sep 17 00:00:00 2001 From: phintuka Date: Wed, 7 May 2008 15:16:48 +0000 Subject: Fix min. length of pes packet with pts --- tools/pes.c | 6 +++--- 1 file 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); -- cgit v1.2.3