summaryrefslogtreecommitdiff
path: root/remux.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2009-01-16 14:44:55 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2009-01-16 14:44:55 +0100
commit71dc09e788f3bc44d8feb7f6724d1ed6698c3acc (patch)
treec3b8245a19de9452353032af35a79839818795f4 /remux.c
parent329d7da4ecb00852a980ba407cf6cabd648d1e95 (diff)
downloadvdr-71dc09e788f3bc44d8feb7f6724d1ed6698c3acc.tar.gz
vdr-71dc09e788f3bc44d8feb7f6724d1ed6698c3acc.tar.bz2
Fixed returning complete PES packets in cTsToPes::GetPes()
Diffstat (limited to 'remux.c')
-rw-r--r--remux.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/remux.c b/remux.c
index 840f5df7..efce4921 100644
--- a/remux.c
+++ b/remux.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: remux.c 2.5 2009/01/06 14:46:21 kls Exp $
+ * $Id: remux.c 2.6 2009/01/16 14:43:15 kls Exp $
*/
#include "remux.h"
@@ -559,8 +559,10 @@ const uchar *cTsToPes::GetPes(int &Length)
}
else {
Length = PesLength(data);
- offset = Length; // to make sure we break out in case of garbage data
- return data;
+ if (Length <= length) {
+ offset = Length; // to make sure we break out in case of garbage data
+ return data;
+ }
}
}
return NULL;