diff options
author | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2008-10-02 05:17:23 +0300 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2008-10-02 05:17:23 +0300 |
commit | ebb4abf2081026c63bb5c983f76447d9d2413656 (patch) | |
tree | f2b3ed868645fd2546173be3500f4c3e0cdf3ecc /libmpdemux | |
parent | 849dc0ba31f209dfdb48146512e48ee2203d0ee6 (diff) | |
parent | 20571d6f6870dab84624cc6b6fbac82cde204f16 (diff) |
Merge svn changes up to r27682
Addition of the "outdir" suboption to vo_png in svn was reverted
before merging.
Conflicts:
command.c
mplayer.c
Diffstat (limited to 'libmpdemux')
-rw-r--r-- | libmpdemux/demux_asf.c | 1 | ||||
-rw-r--r-- | libmpdemux/demux_real.c | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/libmpdemux/demux_asf.c b/libmpdemux/demux_asf.c index 518d08d220..7d8bd82a1a 100644 --- a/libmpdemux/demux_asf.c +++ b/libmpdemux/demux_asf.c @@ -499,7 +499,6 @@ static int demux_asf_fill_buffer(demuxer_t *demux, demux_stream_t *ds){ p++; //printf(" group part: %d bytes\n",len2); if(len2 > len - 1 || len2 < 0) break; // Not enough data - if(len2 == 0) continue; len2 = FFMIN(len2, asf->packetsize); demux_asf_read_packet(demux,p,len2,streamno,seq,x,duration,-1,keyframe); p+=len2; diff --git a/libmpdemux/demux_real.c b/libmpdemux/demux_real.c index 7de8611ec0..88e6574d6e 100644 --- a/libmpdemux/demux_real.c +++ b/libmpdemux/demux_real.c @@ -947,6 +947,7 @@ got_video: // last fragment! if(dp_hdr->len!=vpkg_length-vpkg_offset) mp_msg(MSGT_DEMUX,MSGL_V,"warning! assembled.len=%d frag.len=%d total.len=%d \n",dp->len,vpkg_offset,vpkg_length-vpkg_offset); + if (vpkg_offset > dp->len - sizeof(dp_hdr_t) - dp_hdr->len) vpkg_offset = dp->len - sizeof(dp_hdr_t) - dp_hdr->len; stream_read(demuxer->stream, dp_data+dp_hdr->len, vpkg_offset); if((dp_data[dp_hdr->len]&0x20) && (sh_video->format==0x30335652)) --dp_hdr->chunks; else dp_hdr->len+=vpkg_offset; @@ -970,6 +971,7 @@ got_video: // non-last fragment: if(dp_hdr->len!=vpkg_offset) mp_msg(MSGT_DEMUX,MSGL_V,"warning! assembled.len=%d offset=%d frag.len=%d total.len=%d \n",dp->len,vpkg_offset,len,vpkg_length); + if (len > dp->len - sizeof(dp_hdr_t) - dp_hdr->len) len = dp->len - sizeof(dp_hdr_t) - dp_hdr->len; stream_read(demuxer->stream, dp_data+dp_hdr->len, len); if((dp_data[dp_hdr->len]&0x20) && (sh_video->format==0x30335652)) --dp_hdr->chunks; else dp_hdr->len+=len; @@ -992,6 +994,7 @@ got_video: extra[0]=1; extra[1]=0; // offset of the first chunk if(0x00==(vpkg_header&0xc0)){ // first fragment: + if (len > dp->len - sizeof(dp_hdr_t)) len = dp->len - sizeof(dp_hdr_t); dp_hdr->len=len; stream_read(demuxer->stream, dp_data, len); ds->asf_packet=dp; |