diff --git a/libavformat/cinedec.c b/libavformat/cinedec.c index 0f2453cdf5..88f5e56902 100644 --- a/libavformat/cinedec.c +++ b/libavformat/cinedec.c @@ -288,7 +288,7 @@ static int cine_read_packet(AVFormatContext *avctx, AVPacket *pkt) AVIOContext *pb = avctx->pb; int n, size, ret; - if (cine->pts >= st->duration) + if (cine->pts >= st->nb_index_entries) return AVERROR_EOF; avio_seek(pb, st->index_entries[cine->pts].pos, SEEK_SET);