[Mplayer-cvslog] CVS: main demux_mpg.c,1.6,1.7
GEREOFFY
arpi_esp at users.sourceforge.net
Wed Apr 18 03:56:12 CEST 2001
Update of /cvsroot/mplayer/main
In directory usw-pr-cvs1:/tmp/cvs-serv30189
Modified Files:
demux_mpg.c
Log Message:
PES supported again, VOB 0x1F0 problems fixed
Index: demux_mpg.c
===================================================================
RCS file: /cvsroot/mplayer/main/demux_mpg.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** demux_mpg.c 2001/04/17 22:34:19 1.6
--- demux_mpg.c 2001/04/18 01:56:10 1.7
***************
*** 1,4 ****
--- 1,7 ----
// MPG/VOB file parser for DEMUXER v2.5 by A'rpi/ESP-team
+ //#define MAX_PS_PACKETSIZE 4096
+ #define MAX_PS_PACKETSIZE (224*1024)
+
static unsigned int read_mpeg_timestamp(stream_t *s,int c){
int d,e;
***************
*** 12,16 ****
}
! static char dvdaudio_table[256];
//static unsigned int packet_start_pos=0;
--- 15,19 ----
}
! //static char dvdaudio_table[256];
//static unsigned int packet_start_pos=0;
***************
*** 28,33 ****
if(verbose>=3) printf("demux_read_packet: %X\n",id);
// if(id==0x1BA) packet_start_pos=stream_tell(demux->stream);
! if(id<0x1BC || id>0x1FF) return -1;
if(id==0x1BE) return -1; // padding stream
if(id==0x1BF) return -1; // private2
--- 31,41 ----
if(verbose>=3) printf("demux_read_packet: %X\n",id);
+ if(id==0x1F0){
+ demux->synced=0; // force resync after 0x1F0
+ return -1;
+ }
+
// if(id==0x1BA) packet_start_pos=stream_tell(demux->stream);
! if(id<0x1BC || id>=0x1F0) return -1;
if(id==0x1BE) return -1; // padding stream
if(id==0x1BF) return -1; // private2
***************
*** 35,39 ****
len=stream_read_word(demux->stream);
if(verbose>=3) printf("PACKET len=%d",len);
! if(len==0 || len>4096) return -2; // invalid packet !!!!!!
while(len>0){ // Skip stuFFing bytes
--- 43,51 ----
len=stream_read_word(demux->stream);
if(verbose>=3) printf("PACKET len=%d",len);
! // if(len==0 || len>MAX_PS_PACKETSIZE) return -2; // invalid packet !!!!!!
! if(len==0 || len>MAX_PS_PACKETSIZE){
! if(verbose>=2) printf("Invalid PS packet len: %d\n",len);
! return -2; // invalid packet !!!!!!
! }
while(len>0){ // Skip stuFFing bytes
***************
*** 131,135 ****
if(verbose>=3) printf(" => len=%d\n",len);
! if(len<=0 || len>4096) return -1; // Invalid packet size
if(id>=0x1C0 && id<=0x1DF){
--- 143,151 ----
if(verbose>=3) printf(" => len=%d\n",len);
! // if(len<=0 || len>MAX_PS_PACKETSIZE) return -1; // Invalid packet size
! if(len<=0 || len>MAX_PS_PACKETSIZE){
! if(verbose>=2) printf("Invalid PS data len: %d\n",len);
! return -1; // invalid packet !!!!!!
! }
if(id>=0x1C0 && id<=0x1DF){
***************
*** 177,181 ****
if(demux->stream->eof) return 0;
demux->filepos=stream_tell(demux->stream);
! ds_read_packet(demux->video,demux->stream,4096,0,0);
return 1;
}
--- 193,197 ----
if(demux->stream->eof) return 0;
demux->filepos=stream_tell(demux->stream);
! ds_read_packet(demux->video,demux->stream,STREAM_BUFFER_SIZE,0,0);
return 1;
}
_______________________________________________
Mplayer-cvslog mailing list
Mplayer-cvslog at lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/mplayer-cvslog
More information about the MPlayer-cvslog
mailing list