mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Fixed the cutting mechanism to make it re-sync in case a frame is larger than the buffer
This commit is contained in:
parent
7da1dc6e1d
commit
26a2d98524
@ -347,3 +347,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
|
||||
|
2
HISTORY
2
HISTORY
@ -1304,3 +1304,5 @@ Video Disk Recorder Revision History
|
||||
started a plugin project, you may want to change this in your Makefile accordingly.
|
||||
- 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).
|
||||
|
9
dvbapi.c
9
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.175 2002/05/13 16:29:17 kls Exp $
|
||||
* $Id: dvbapi.c 1.176 2002/05/18 09:21:39 kls Exp $
|
||||
*/
|
||||
|
||||
#include "dvbapi.h"
|
||||
@ -1527,11 +1527,14 @@ 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";
|
||||
|
Loading…
Reference in New Issue
Block a user