1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Fixed detecting the frame rate for radio recordings

This commit is contained in:
Klaus Schmidinger 2009-04-05 14:15:25 +02:00
parent daa6799705
commit 0a2de94d07
2 changed files with 7 additions and 6 deletions

View File

@ -6024,3 +6024,4 @@ Video Disk Recorder Revision History
- Making sure any floating point numbers written use a decimal point (thanks to - Making sure any floating point numbers written use a decimal point (thanks to
Oliver Endriss for pointing out a problem with the F record in the info file of Oliver Endriss for pointing out a problem with the F record in the info file of
a recording). a recording).
- Fixed detecting the frame rate for radio recordings.

12
remux.c
View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: remux.c 2.16 2009/03/27 13:49:58 kls Exp $ * $Id: remux.c 2.17 2009/04/05 14:07:48 kls Exp $
*/ */
#include "remux.h" #include "remux.h"
@ -758,7 +758,7 @@ int cFrameDetector::Analyze(const uchar *Data, int Length)
if (DebugFrames && !synced) if (DebugFrames && !synced)
dbgframes("/"); dbgframes("/");
} }
for (int i = PayloadOffset; i < TS_SIZE; i++) { for (int i = PayloadOffset; scanning && i < TS_SIZE; i++) {
scanner <<= 8; scanner <<= 8;
scanner |= Data[i]; scanner |= Data[i];
switch (type) { switch (type) {
@ -813,12 +813,12 @@ int cFrameDetector::Analyze(const uchar *Data, int Length)
return Processed; return Processed;
newFrame = true; newFrame = true;
independentFrame = true; independentFrame = true;
if (synced) if (!synced) {
scanning = false;
else {
framesInPayloadUnit = 1; framesInPayloadUnit = 1;
numIFrames++; if (TsPayloadStart(Data))
numIFrames++;
} }
scanning = false;
break; break;
default: esyslog("ERROR: unknown stream type %d (PID %d) in frame detector", type, pid); default: esyslog("ERROR: unknown stream type %d (PID %d) in frame detector", type, pid);
pid = 0; // let's just ignore any further data pid = 0; // let's just ignore any further data