[ANNOUNCE] small ac3 fix for replex

Message ID 20081207120703.GA20645@halim.local
State New
Headers

Commit Message

Halim Sahin Dec. 7, 2008, 12:07 p.m. UTC
  hi,
Here is a patch for replex which improoves ac3 detection.
This patch was written by Reinhard Nissl and tested against
latest replex from metzlerbros.de.
Thanks Reinhard!!!!!
Regards
halim
  

Patch

--- replex.c.orig	2007-06-19 11:30:08.000000000 +0200
+++ replex.c	2008-04-05 20:40:32.000000000 +0200
@@ -1586,9 +1586,9 @@  void pes_id_out(pes_in_t *p)
 				fframe = p->buf[9+p->hlength+3];
 				fframe |= (p->buf[9+p->hlength+2]<<8);
 				
-				if (fframe < p->plength){
+				if (fframe > 0 && fframe < p->plength){
 					if ((c=find_audio_s(p->buf,
-							    9+p->hlength+4+fframe,
+							    9+p->hlength+4+fframe-1,
 							    AC3, p->plength+6)) >= 0){
 						rx->scan_found = id;
 						//fprintf(stderr,"0x%04x  0x%04x \n",