diff options
author | 2001-03-29 00:18:35 +0000 | |
---|---|---|
committer | 2001-03-29 00:18:35 +0000 | |
commit | 9396e813dedf5d32b82707f3dcf99c6a4f521400 (patch) | |
tree | df4c2d39e12ea848b3886e9507c139e3818345ab | |
parent | 22f52e999069b0daef08c639fe44d121c6d4e7a5 (diff) |
fix: packet longer than 4096 bytes
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@243 b3059339-0415-0410-9bf9-f77b7e298cf2
-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 |