Mercurial > libavformat.hg
changeset 2285:a36b77f40ee2 libavformat
ignore invalid packet_obj_size
fixes video5.asf
author | michael |
---|---|
date | Fri, 27 Jul 2007 00:29:33 +0000 |
parents | 59d84b0f7d30 |
children | 5fca908f82ea |
files | asf.c |
diffstat | 1 files changed, 9 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/asf.c Thu Jul 26 22:34:26 2007 +0000 +++ b/asf.c Fri Jul 27 00:29:33 2007 +0000 @@ -773,6 +773,15 @@ 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){