Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vdr] Re: [PATCH] DXR3: GetSTC



On Tuesday 02 December 2003 09:41, Karsten Petersen wrote:
> Hi,
>
> the attached "WORKSFORME"-patch implements the GetSTC function for the
> DXR3 plugin.  It was tested with vdr-1.2.6 and vdr-dvd-0.3.4-rc10 and
> worked fine.
>

I've already talked to Sven Goethel about that problem and he sent me a fix 
for the DVD-Plugin code (which works). I believe this will go into his next
release.
The dxr3-plugin does its own synchronisation and it doesn't make sense that
the DVD-Plugin tries to do the same (when running with a dxr3 card).
The problem is that the current code doesn't handle the return value of the
STC-Function correctly.
Attached you'll find what I received from Sven.
 
Regards,
 
Kai
 

--- player-dvd.c.old	2003-11-11 14:41:52.000000000 +0100
+++ player-dvd.c	2003-11-18 05:06:20.000000000 +0100
@@ -1151,9 +1151,9 @@
   uchar *data = sector;
     
   stcPTSLast = stcPTS ;
-  int64_t ullh;
-  if ( (ullh=cDevice::PrimaryDevice()->GetSTC())>=0 )
-	stcPTS=(uint32_t)ullh;
+  int64_t rawSTC;
+  if ( (rawSTC=cDevice::PrimaryDevice()->GetSTC())>=0 )
+	stcPTS=(uint32_t)rawSTC;
 
   switch (cPStream::packetType(sector)) {
     case VIDEO_STREAM_S ... VIDEO_STREAM_E:
@@ -1274,10 +1274,12 @@
 	     lapts = pktpts;
 	 }
 
-         pktptsLastAudio = pktptsAudio ;
-         stcPTSLastAudio = stcPTSAudio ;
-         pktptsAudio = pktpts;
-         stcPTSAudio = stcPTS;
+	 if(rawSTC>=0) {
+		 pktptsLastAudio = pktptsAudio ;
+		 stcPTSLastAudio = stcPTSAudio ;
+		 pktptsAudio = pktpts;
+		 stcPTSAudio = stcPTS;
+	 }
 
  	 if ( !(playMULTICHANNEL) && 
 	      ( !HasBitStreamOut || BitStreamOutActive ) )
@@ -1342,10 +1344,12 @@
 		      blk_attr = BLK_ATTR_AUDIO;
 	 	      currentNavAudioTrackType = audioType;
 
-		      pktptsLastAudio = pktptsAudio ;
-		      stcPTSLastAudio = stcPTSAudio ;
-		      pktptsAudio = pktpts;
-		      stcPTSAudio = stcPTS;
+		      if(rawSTC>=0) {
+			      pktptsLastAudio = pktptsAudio ;
+			      stcPTSLastAudio = stcPTSAudio ;
+			      pktptsAudio = pktpts;
+			      stcPTSAudio = stcPTS;
+		      }
 
  		      if ( !(playMULTICHANNEL) && 
                            ( !HasBitStreamOut || BitStreamOutActive ) ) 

Home | Main Index | Thread Index