summaryrefslogtreecommitdiff
path: root/remux.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2014-02-21 15:17:08 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2014-02-21 15:17:08 +0100
commit1c47cf37ca45280df1f17cd1870b82b2bbb48dd5 (patch)
tree36220f8fa11e67026cad9e51606b41e2f7cb79c9 /remux.c
parentd55c134333ca4e464713c83264c3ce426f891ba7 (diff)
downloadvdr-1c47cf37ca45280df1f17cd1870b82b2bbb48dd5.tar.gz
vdr-1c47cf37ca45280df1f17cd1870b82b2bbb48dd5.tar.bz2
Fixed handling frame detection buffer length
Diffstat (limited to 'remux.c')
-rw-r--r--remux.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/remux.c b/remux.c
index 5bf57fd8..5906d365 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.75.1.2 2014/01/28 12:36:57 kls Exp $
+ * $Id: remux.c 2.75.1.3 2014/02/21 14:37:51 kls Exp $
*/
#include "remux.h"
@@ -1153,8 +1153,7 @@ int cMpeg2Parser::Parse(const uchar *Data, int Length, int Pid)
break;
}
if (tsPayload.AtPayloadStart() // stop at any new payload start to have the buffer refilled if necessary
- || (tsPayload.Available() < MIN_TS_PACKETS_FOR_FRAME_DETECTOR * TS_SIZE // stop if the available data is below the limit...
- && (tsPayload.Available() <= 0 || tsPayload.AtTsStart()))) // ...but only if there is no more data at all, or if we are at a TS boundary
+ || tsPayload.Eof()) // or if we're out of data
break;
}
return tsPayload.Used();
@@ -1305,8 +1304,7 @@ int cH264Parser::Parse(const uchar *Data, int Length, int Pid)
}
}
if (tsPayload.AtPayloadStart() // stop at any new payload start to have the buffer refilled if necessary
- || (tsPayload.Available() < MIN_TS_PACKETS_FOR_FRAME_DETECTOR * TS_SIZE // stop if the available data is below the limit...
- && (tsPayload.Available() <= 0 || tsPayload.AtTsStart()))) // ...but only if there is no more data at all, or if we are at a TS boundary
+ || tsPayload.Eof()) // or if we're out of data
break;
}
return tsPayload.Used();