Revision 2c14ded3 libavformat/avidec.c

View differences:

libavformat/avidec.c
679 679
            AVStream *st = s->streams[i];
680 680
            AVIStream *ast = st->priv_data;
681 681
            int64_t ts= ast->frame_offset;
682
            int64_t last_ts;
682 683

  
683 684
            if(!st->nb_index_entries)
684 685
                continue;
685 686

  
686 687
            if(ast->sample_size)
687 688
                ts /= ast->sample_size;
689

  
690
            last_ts = st->index_entries[st->nb_index_entries - 1].timestamp;
691
            if(!ast->remaining && ts > last_ts)
692
                continue;
693

  
688 694
            ts = av_rescale_q(ts, st->time_base, AV_TIME_BASE_Q);
689 695

  
690 696
//            av_log(s, AV_LOG_DEBUG, "%"PRId64" %d/%d %"PRId64"\n", ts, st->time_base.num, st->time_base.den, ast->frame_offset);

Also available in: Unified diff