summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2002-05-18 14:18:06 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2002-05-18 14:18:06 +0200
commit720f1ffd7b1701723d0ee3186d3764c16ce767aa (patch)
tree91b5c98ad34788a77c4a77905ec7bdc2f7e03898
parent5b64f51b0b168c709a635c72712374c2a1f47b3f (diff)
downloadvdr-720f1ffd7b1701723d0ee3186d3764c16ce767aa.tar.gz
vdr-720f1ffd7b1701723d0ee3186d3764c16ce767aa.tar.bz2
Fixed the cutting mechanism to make it re-sync in case a frame is larger than the buffer
-rw-r--r--CONTRIBUTORS4
-rw-r--r--HISTORY2
-rw-r--r--dvbapi.c10
3 files changed, 13 insertions, 3 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index a6329b9a..2e7f41fe 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -335,3 +335,7 @@ Rudi Hofer (Rudi.Hofer@cadsoft.de)
Gregoire Favre <greg@ulima.unil.ch>
for fixing some function headers to make them compile with gcc 3.x
+
+Sven Grothklags <sven@uni-paderborn.de>
+ for fixing the cutting mechanism to make it re-sync in case a frame is larger
+ than the buffer
diff --git a/HISTORY b/HISTORY
index bbdd7904..e7a7b44e 100644
--- a/HISTORY
+++ b/HISTORY
@@ -1248,3 +1248,5 @@ Video Disk Recorder Revision History
- Updated 'Premiere Sport 2' in channels.conf (thanks to Rudi Hofer).
- Fixed some function headers to make them compile with gcc 3.x (thanks to
Gregoire Favre).
+- Fixed the cutting mechanism to make it re-sync in case a frame is larger than the
+ buffer (thanks to Sven Grothklags).
diff --git a/dvbapi.c b/dvbapi.c
index 77e53726..04a13ce6 100644
--- a/dvbapi.c
+++ b/dvbapi.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: dvbapi.c 1.174 2002/05/03 15:59:32 kls Exp $
+ * $Id: dvbapi.c 1.174.1.1 2002/05/18 14:15:36 kls Exp $
*/
#include "dvbapi.h"
@@ -1527,11 +1527,15 @@ void cCuttingBuffer::Action(void)
CurrentFileNumber = FileNumber;
}
if (fromFile >= 0) {
- Length = ReadFrame(fromFile, buffer, Length, sizeof(buffer));
- if (Length < 0) {
+ int len = ReadFrame(fromFile, buffer, Length, sizeof(buffer));
+ if (len < 0) {
error = "ReadFrame";
break;
}
+ if (len != Length) {
+ CurrentFileNumber = 0; // this re-syncs in case the frame was larger than the buffer
+ Length = len;
+ }
}
else {
error = "fromFile";