avformat/asfdec: Try to improve skip case

Fixes Ticket3761

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2014-07-14 01:16:08 +02:00
parent cc3e7a4c3d
commit 2db1bcf1b9
1 changed files with 2 additions and 2 deletions

View File

@ -1128,8 +1128,8 @@ static int asf_parse_packet(AVFormatContext *s, AVIOContext *pb, AVPacket *pkt)
int ret;
if (url_feof(pb))
return AVERROR_EOF;
if (asf->packet_size_left < FRAME_HEADER_SIZE) {
if (asf->packet_size_left < FRAME_HEADER_SIZE ||
asf->packet_segments < 1 && asf->packet_time_start == 0) {
int ret = asf->packet_size_left + asf->packet_padsize;
assert(ret >= 0);