diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2014-02-21 15:14:14 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2014-02-21 15:14:14 +0100 |
commit | 4cd251fc48043f1aa56d58da8de34ceb99536dfc (patch) | |
tree | f5e2611d04533a85c81de8c5d8c1663321c1921f /remux.c | |
parent | 6d59e2866b91b5787dbe4d46955df70bd5a1e8fe (diff) | |
download | vdr-4cd251fc48043f1aa56d58da8de34ceb99536dfc.tar.gz vdr-4cd251fc48043f1aa56d58da8de34ceb99536dfc.tar.bz2 |
Fixed handling frame detection buffer length
Diffstat (limited to 'remux.c')
-rw-r--r-- | remux.c | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: remux.c 3.2 2014/01/28 11:07:59 kls Exp $ + * $Id: remux.c 3.3 2014/02/21 11:51:55 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(); |