Mailing List archive

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

[linux-dvb] Re: Audio/Video Sync after remultiplexing (more)



Klaus Schmidinger writes:

 > 
 > That, of course, would be the optimal solution! I sincerely hope
 > that you'll succeed with this :-)
 > 
Ok, after some playing with the code I improved the driver  a little
and ZDF works better now. I will put the diff for dvb.c at the end of
the mail, for those who can't wait for the CVS update.

Marcus

---------------------------------------------------------------------
Dr. Marcus Metzler                             
mocm@netcologne.de                     http://www.metzlerbros.de
mocm@convergence.de                    http://www.convergence.de

Convergence Integrated Media GmbH          
Rosenthaler Str. 51                   
D-10178 Berlin                             
---------------------------------------------------------------------
--- ../tmp/DVB/driver/dvb.c	Sat Jan  6 01:52:59 2001
+++ driver/dvb.c	Sat Jan  6 14:55:17 2001
@@ -4725,15 +4725,35 @@
 				l = count - c;
 				if ( l + p->found > p->length+8 )
 					l = p->length - p->found +8;
-				
-				if ( p->found == 8 && (p->flags & PTS_FLAG) 
-				     && p->alength){
+
+				if ( p->found == 8 && 
+				     p->alength ){
+					p->abuf[4] = 0;
+					p->abuf[5] = 0;
+					p->abuf[4] |= 
+						(u8)(((p->alength-6) >> 8) & 
+						     0xFF); 
+					p->abuf[5] |= 
+						(u8)((p->alength-6) & 
+						     0xFF); 
                                         p->write_cb(p->abuf,
                                                     p->alength,
                                                     p->dataA);
-					p->alength=0;
+					if (
+						(count -c >4 &&
+						 buf[c] == 0x00 &&
+						 buf[c+1] == 0x00 &&
+						 buf[c+2] == 0x01 &&
+						 buf[c+3] == 0xC0)
+						){
+						p->alength=0;
+					} else {
+						p->alength = w_pesh(
+							0xC0,0,
+							NULL, p->abuf);
+					}
 				}
-				
+		
 				memcpy(p->abuf+p->alength,buf+c,l);
 				p->alength += l;
 				c += l;


--- 
Info:
To unsubscribe send a mail to listar@linuxtv.org with unsubscribe as subject.



Home | Main Index | Thread Index