diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2007-07-27 00:29:33 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2007-07-27 00:29:33 +0000 |
commit | 60ff1c448153bb4fab3bb182dc5b68fbf0aaf9ed (patch) | |
tree | 0365202aed01bfa5fc41f9f0679b0aa53945a981 /libavformat/asf.c | |
parent | c5388c07841280e0c8b6828b56c538d784aa0f1a (diff) | |
download | ffmpeg-60ff1c448153bb4fab3bb182dc5b68fbf0aaf9ed.tar.gz |
ignore invalid packet_obj_size
fixes video5.asf
Originally committed as revision 9807 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/asf.c')
-rw-r--r-- | libavformat/asf.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libavformat/asf.c b/libavformat/asf.c index 550c37ce41..54ced89db0 100644 --- a/libavformat/asf.c +++ b/libavformat/asf.c @@ -773,6 +773,15 @@ static int asf_read_packet(AVFormatContext *s, AVPacket *pkt) asf->packet_multi_size -= asf->packet_obj_size; //printf("COMPRESS size %d %d %d ms:%d\n", asf->packet_obj_size, asf->packet_frag_timestamp, asf->packet_size_left, asf->packet_multi_size); } + if( /*asf->packet_frag_size == asf->packet_obj_size*/ + asf_st->frag_offset + asf->packet_frag_size <= asf_st->pkt.size + && asf_st->frag_offset + asf->packet_frag_size > asf->packet_obj_size){ + av_log(s, AV_LOG_INFO, "ignoring invalid packet_obj_size (%d %d %d %d)\n", + asf_st->frag_offset, asf->packet_frag_size, + asf->packet_obj_size, asf_st->pkt.size); + asf->packet_obj_size= asf_st->pkt.size; + } + if ( asf_st->pkt.size != asf->packet_obj_size || asf_st->frag_offset + asf->packet_frag_size > asf_st->pkt.size) { //FIXME is this condition sufficient? if(asf_st->pkt.data){ |