avformat/asfdec: Try to improve skip case
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 13 Jul 2014 23:16:08 +0000 (01:16 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 13 Jul 2014 23:16:08 +0000 (01:16 +0200)
Fixes Ticket3761

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/asfdec.c

index 270ba1d..978b956 100644 (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);