Mailing List archive

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

[linux-dvb] Re: Replex



Paulo Figueiredo writes:
 > Hi,
 > 
 > Thursday, February 26, 2004, 6:02:51 PM, you wrote:
 > 
 > Did you get the file? Any news about the error?
 > 
 > -- 

Ok, I just checked out the file and I must say that the TS is very
strange. Lots of filling bytes in the PES which led to some problems
which I usually only have with PS files. I have a fix for the problem
and it will be in the next release, but for the impatient I will add
the diff to this mail.

Marcus

-- 
/--------------------------------------------------------------------\
| Dr. Marcus O.C. Metzler        |                                   |
| mocm@metzlerbros.de            | http://www.metzlerbros.de/        |
\--------------------------------------------------------------------/
 |>>>             Quis custodiet ipsos custodies                 <<<|


diff -u -r1.85 replex.c
--- replex.c	2004/01/29 16:15:17	1.85
+++ replex.c	2004/03/02 21:39:12
@@ -271,6 +271,11 @@
 
 	rx->vpes_abort = 0;
 	off = ring_rdiff(rbuf, p->ini_pos);
+#ifdef IN_DEBUG
+	fprintf(stderr, " ini pos %d\n",
+		(p->ini_pos)%rx->videobuf);
+#endif
+
 	
 //	fprintf(stderr, "len %d  %d\n",len,off);
 	while (c < len){
@@ -292,6 +297,9 @@
 					re = get_video_info(rbuf, &rx->seq_head, 
 							    pos+c+off, len -c -pos);
 
+#ifdef IN_DEBUG
+					fprintf(stderr, " seq headr result %d\n",re);
+#endif
 					if (re == -2){
 						rx->vpes_abort = len -(c+pos-1);
 						return;
@@ -608,6 +616,10 @@
 	{
 	case 0xE0: {
 		sprintf(t, "Video ");
+		if (rx->vpes_abort){
+			p->ini_pos = (p->ini_pos - rx->vpes_abort)%rx->vrbuffer.size;
+			len += rx->vpes_abort;
+		}
 		analyze_video(p, rx, len);
 		if (!rx->seq_head.set){
 			ring_skip(&rx->vrbuffer, len);
@@ -619,6 +631,11 @@
 		int l;
 		l = p->type - 1;
 		sprintf(t, "Audio%d ", l);
+		if (rx->apes_abort[l]){
+			p->ini_pos = (p->ini_pos - rx->apes_abort[l])
+			  %rx->arbuffer[l].size;
+			len += rx->apes_abort[l];
+		}
 		analyze_audio(p, rx, len, l, MPEG_AUDIO);
 		if (!rx->aframe[l].set)
 			ring_skip(&rx->arbuffer[l], len);
@@ -630,6 +647,11 @@
 		int l;
 		l = p->type - 0x80;
 		sprintf(t, "AC3 %d ", p->type);
+		if (rx->ac3pes_abort[l]){
+			p->ini_pos = (p->ini_pos - rx->ac3pes_abort[l])
+				%rx->ac3rbuffer[l].size;
+			len += rx->ac3pes_abort[l];
+		}
 		analyze_audio(p, rx, len, l, AC3);
 		if (!rx->ac3frame[l].set)
 			ring_skip(&rx->ac3rbuffer[l], len);


-- 
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe linux-dvb" as subject.



Home | Main Index | Thread Index