diff options
-rw-r--r-- | demux_mpg.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/demux_mpg.c b/demux_mpg.c index f276541727..4a107907fa 100644 --- a/demux_mpg.c +++ b/demux_mpg.c @@ -31,7 +31,7 @@ static int demux_mpg_read_packet(demuxer_t *demux,int id){ len=stream_read_word(demux->stream); if(verbose>=3) printf("PACKET len=%d",len); - if(len==0 || len>4096) return -2; // invalid packet !!!!!! + if(len==0 || len>224*1024) return -2; // invalid packet !!!!!! while(len>0){ // Skip stuFFing bytes c=stream_read_char(demux->stream);--len; @@ -65,7 +65,7 @@ static int demux_mpg_read_packet(demuxer_t *demux,int id){ c=stream_read_char(demux->stream); hdrlen=c; len-=2; if(verbose>=3) printf(" hdrlen=%d (len=%d)",hdrlen,len); - if(hdrlen>len) return -1; // invalid header length + if(hdrlen>len){ printf("demux_mpg: invalid header length \n"); return -1;} if(pts_flags==2){ c=stream_read_char(demux->stream); pts=read_mpeg_timestamp(demux->stream,c); @@ -123,9 +123,9 @@ static int demux_mpg_read_packet(demuxer_t *demux,int id){ } else { //if(c!=0x0f) printf(" {ERROR5,c=%d} \n",c); } - if(verbose>=3) printf("\n"); + if(verbose>=3) printf(" => len=%d\n",len); - if(len<=0 || len>4096) return -1; // Invalid packet size + if(len<=0 || len>224*1024) return -1; // Invalid packet size if(id>=0x1C0 && id<=0x1DF){ // mpeg audio |